nguyer / node-kinect

Kinect in Node
181 stars 34 forks source link

npm test error... #6

Closed corpr8 closed 9 years ago

corpr8 commented 10 years ago

When I try and run npm test after cloning (on a raspberry Pi), I see a slightly different error to the one in the other post:

Error: Cannot find module './build/Release/kinect.node' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/home/pi/node-kinect/kinect.js:1:82) 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 Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/home/pi/node-kinect/test/base.js:1:76) 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 Module.require (module.js:364:17) at require (module.js:380:17) at /home/pi/node-kinect/node_modules/mocha/lib/mocha.js:152:27 at Array.forEach (native) at Mocha.loadFiles (/home/pi/node-kinect/node_modules/mocha/lib/mocha.js:149:14) at Mocha.run (/home/pi/node-kinect/node_modules/mocha/lib/mocha.js:306:31) at Object. (/home/pi/node-kinect/node_modules/mocha/bin/_mocha:343:7) 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) at node.js:901:3 npm ERR! Test failed. See above for more details. npm ERR! not ok code 0

Any idea's? Many thanks...

yocontra commented 10 years ago

Can you show the logs of your npm install? It seems like the native module failed to build.

WA9ACE commented 10 years ago

I have this same issue. Here's a screencap of my terminal including the npm install screen shot 2013-09-07 at 1 01 14 pm

ericsims commented 10 years ago

I have this same issue on Linux. Any ideas?

chilijung commented 10 years ago

same error, too.

yocontra commented 10 years ago

Did you guys install libusb and libfreenect before?

vivekvasani commented 10 years ago

Same error. I pre-installed libusb and libfreenect.

TorbenDalgaard commented 10 years ago

Any news regarding this issue ?

nguyer commented 9 years ago

Hi, @corpr8. I am the new maintainer of this repo now, and I'm looking through the open issues. Is this still an issue for you with the latest version?

VadasEnterprises commented 9 years ago

@nguyer: Hi, I'm new here and this is the only way I could contact you. Does this work with Kinect Version 2.0 from Xbox One?

nguyer commented 9 years ago

Hi @VadasEnterprises. This library does not work with the new version of the Kinect (yet). It is just a Node.js binding for the libfreenect library which only works with the Xbox 360 Kinect. The libfreenect2 library works with the new Xbox One Kinect, but this project does not provide an interface for this library yet.

galkn commented 9 years ago

any progress on this?

nguyer commented 9 years ago

@get Which are you asking about? The npm test error, or Xbox One support? I have not been able to repro the npm test issue and I haven't heard that anyone still has problems with it on the latest version so I closed the issue. If it's still a problem though, I'd be happy to reopen and investigate.

As far as Xbox One support, unfortunately I do not have the time to devote to also wrapping libfreenect2, although I think there are some other Node projects out there that have tried to do this.

jzellis commented 9 years ago

I'm getting this same issue with the Kinect 360 on OS X, same messages, libusb and libfreenect installed (via homebrew). As your lib seems to be the only one still being supported, I'd be anxious to figure out how to solve this. :-)

jfenwick commented 8 years ago

I'm trying to run the test on raspberry pi with an Xbox 360 and I'm getting this error: pi@raspberrypi:~/node-kinect $ npm test

kinect@0.3.0 test /home/pi/node-kinect mocha test/*.js

module.js:339 throw err; ^

Error: Cannot find module './build/Release/kinect.node' at Function.Module._resolveFilename (module.js:337:15) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at Object. (/home/pi/node-kinect/kinect.js:1:82) at Module._compile (module.js:435:26) at Object.Module._extensions..js (module.js:442:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:311:12) at Module.require (module.js:366:17) at require (module.js:385:17) at Object. (/home/pi/node-kinect/test/base.js:1:76) at Module._compile (module.js:435:26) at Object.Module._extensions..js (module.js:442:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:311:12) at Module.require (module.js:366:17) at require (module.js:385:17) at /home/pi/node-kinect/node_modules/mocha/lib/mocha.js:216:27 at Array.forEach (native) at Mocha.loadFiles (/home/pi/node-kinect/node_modules/mocha/lib/mocha.js:213:14) at Mocha.run (/home/pi/node-kinect/node_modules/mocha/lib/mocha.js:453:10) at Object. (/home/pi/node-kinect/node_modules/mocha/bin/_mocha:393:18) at Module._compile (module.js:435:26) at Object.Module._extensions..js (module.js:442:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:311:12) at Function.Module.runMain (module.js:467:10) at startup (node.js:134:18) at node.js:961:3 npm ERR! Test failed. See above for more details.

j-r-t commented 8 years ago

@jfenwick you need to build first using

node-gyp configure node-gyp build

povalles commented 8 years ago

Hi, I have similar problem in Ubuntu 14.04

povalles@povalles-pc:~/node-kinect$ node-gyp build gyp info it worked if it ends with ok gyp info using node-gyp@3.3.0 gyp info using node@0.10.25 | linux | x64 gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] make: se ingresa al directorio «/home/povalles/node-kinect/build» SOLINK_MODULE(target) Release/obj.target/kinect.node g++: error: libfreenect.a: No existe el archivo o el directorio make: *\ [Release/obj.target/kinect.node] Error 1 make: se sale del directorio «/home/povalles/node-kinect/build» gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12) gyp ERR! System Linux 3.16.0-62-generic gyp ERR! command "node" "/usr/local/bin/node-gyp" "build" gyp ERR! cwd /home/povalles/node-kinect gyp ERR! node -v v0.10.25 gyp ERR! node-gyp -v v3.3.0 gyp ERR! not ok

I modified the kinect.target.mk

original: LIBS := \ libfreenect.a

New: LIBS := \ /usr/local/lib64/libfreenect.a

With the changed the build was succes

povalles@povalles-pc:~/node-kinect$ node-gyp build gyp info it worked if it ends with ok gyp info using node-gyp@3.3.0 gyp info using node@0.10.25 | linux | x64 gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] make: se ingresa al directorio «/home/povalles/node-kinect/build» SOLINK_MODULE(target) Release/obj.target/kinect.node COPY Release/kinect.node make: se sale del directorio «/home/povalles/node-kinect/build» gyp info ok

but when i tried run the test i have problems with libusb_init

povalles@povalles-pc:~/node-kinect$ npm test

kinect@0.3.0 test /home/povalles/node-kinect node_modules/.bin/mocha test/*.js

Base /usr/bin/nodejs: symbol lookup error: /home/povalles/node-kinect/build/Release/kinect.node: undefined symbol: libusb_init npm ERR! weird error 127 npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0

any idea?

yashkp commented 8 years ago

Has anybody resolved this?

povalles commented 8 years ago

I changed the binding.gyp to reference the library:

{ 'targets': [ { 'target_name': 'kinect', 'sources': [ 'src/kinect.cc', ], 'libraries': [ '/usr/local/lib/libfreenect.so', ], 'conditions': [ ['OS=="linux"', { 'include_dirs': ['/usr/local/include'], 'library_dirs': ['/usr/local/lib'], }], ] } ] }