interval-tree icon indicating copy to clipboard operation
interval-tree copied to clipboard

Project crash on its own tests

Open romain-gilliotte opened this issue 12 years ago • 1 comments

Project crash on its own tests. I'm using node 0.10.20 and installing from npm.

user@host:~$ cd /tmp
user@host:/tmp$ npm install interval-tree
npm http GET https://registry.npmjs.org/interval-tree
npm http 304 https://registry.npmjs.org/interval-tree
npm http GET https://registry.npmjs.org/sortedlist
npm http 304 https://registry.npmjs.org/sortedlist
[email protected] node_modules/interval-tree
└── [email protected]
user@host:/tmp$ cd node_modules/interval-tree/
user@host:/tmp/node_modules/interval-tree$ node --version
v0.10.20
user@host:/tmp/node_modules/interval-tree$ npm view interval-tree version
0.0.2
user@host:/tmp/node_modules/interval-tree$ node test.js 

/tmp/node_modules/interval-tree/IntervalTree.js:154
    node.starts.arr.map(function(itvl) { arr.push(itvl.result()) });
                    ^
TypeError: Cannot call method 'map' of undefined
    at IntervalTree._pointSearch (/tmp/node_modules/interval-tree/IntervalTree.js:154:21)
    at IntervalTree.search (/tmp/node_modules/interval-tree/IntervalTree.js:80:18)
    at test (/tmp/node_modules/interval-tree/test.js:28:25)
    at Object.<anonymous> (/tmp/node_modules/interval-tree/test.js:71:3)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)

romain-gilliotte avatar Oct 25 '13 15:10 romain-gilliotte

I just came across this problem too. I fixed it and sent a pull request. Looks like the dependency SortedList api had been changed.

Traksewt avatar Jan 31 '14 12:01 Traksewt