andrew / node-xbox-controller

:video_game: [UNMAINTAINED] Interface for Xbox 360 game controller into Node.js
http://libraries.io/npm/xbox-controller
MIT License
270 stars 49 forks source link

Failed at the node-hid@0.3.1 install script #18

Closed nicktheo59 closed 10 years ago

nicktheo59 commented 10 years ago

nick2@nick-ThinkPad-E520:~/nodecopter/node_modules/xbox-parrot$ npm install npm http GET https://registry.npmjs.org/xbox-controller npm http GET https://registry.npmjs.org/ar-drone npm http 304 https://registry.npmjs.org/ar-drone npm http 304 https://registry.npmjs.org/xbox-controller npm http GET https://registry.npmjs.org/chalk npm http GET https://registry.npmjs.org/node-hid npm http GET https://registry.npmjs.org/buffy/0.0.4 npm http GET https://registry.npmjs.org/simple-debug npm http 304 https://registry.npmjs.org/chalk npm http 304 https://registry.npmjs.org/buffy/0.0.4 npm http 304 https://registry.npmjs.org/node-hid npm http GET https://registry.npmjs.org/has-color npm http GET https://registry.npmjs.org/ansi-styles

node-hid@0.3.1 preinstall /home/nick2/nodecopter/node_modules/xbox-parrot/node_modules/xbox-controller/node_modules/node-hid sh get-hidapi.sh

Cloning into 'hidapi'... remote: Reusing existing pack: 1917, done. remote: Total 1917 (delta 0), reused 0 (delta 0) Receiving objects: 100% (1917/1917), 2.78 MiB | 17.00 KiB/s, done. Resolving deltas: 100% (1050/1050), done. Checking connectivity... done npm http 304 https://registry.npmjs.org/simple-debug npm http 304 https://registry.npmjs.org/ansi-styles npm http 304 https://registry.npmjs.org/has-color

node-hid@0.3.1 install /home/nick2/nodecopter/node_modules/xbox-parrot/node_modules/xbox-controller/node_modules/node-hid sh install.sh

make: Entering directory `/home/nick2/nodecopter/node_modules/xbox-parrot/node_modules/xbox-controller/node_modules/node-hid/build' CC(target) Release/obj.target/hidapi/hidapi/libusb/hid.o ../hidapi/libusb/hid.c:47:20: fatal error: libusb.h: No such file or directory

include "libusb.h"

                ^

compilation terminated. make: *** [Release/obj.target/hidapi/hidapi/libusb/hid.o] Error 1 make: Leaving directory/home/nick2/nodecopter/node_modules/xbox-parrot/node_modules/xbox-controller/node_modules/node-hid/build' gyp ERR! build error gyp ERR! stack Error:makefailed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267: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.11.0-22-generic gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "install" gyp ERR! cwd /home/nick2/nodecopter/node_modules/xbox-parrot/node_modules/xbox-controller/node_modules/node-hid gyp ERR! node -v v0.10.26 gyp ERR! node-gyp -v v0.12.2 gyp ERR! not ok npm ERR! node-hid@0.3.1 install:sh install.sh` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-hid@0.3.1 install script. npm ERR! This is most likely a problem with the node-hid package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! sh install.sh npm ERR! You can get their info via: npm ERR! npm owner ls node-hid npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.0-22-generic npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! cwd /home/nick2/nodecopter/node_modules/xbox-parrot npm ERR! node -v v0.10.26 npm ERR! npm -v 1.4.3 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/nick2/nodecopter/node_modules/xbox-parrot/npm-debug.log npm ERR! not ok code 0

nicktheo59 commented 10 years ago

looks like libusb.h missing or something

nicktheo59 commented 10 years ago

might have found the problem - i needed to install: libudev-dev (Linux only) libusb-1.0-0-dev (Ubuntu versions missing libusb.h only)

andrew commented 10 years ago

Ah good catch, we should add a note about that to the readme

mjosborne1 commented 10 years ago

I have a similar error installing xbox-controller , any ideas? I am running node version 0.10.29 on x64 Windows 8.1 My compiler is VS2013 x64

--snip-- D:\Skydrive\Code\GIT\Arduino\nodebotsday2014\nodejs>npm install xbox-controller /

node-hid@0.3.1 preinstall D:\Skydrive\Code\GIT\node_modules\xbox-controller\no de_modules\node-hid sh get-hidapi.sh

'sh' is not recognized as an internal or external command, operable program or batch file. npm ERR! node-hid@0.3.1 preinstall: sh get-hidapi.sh npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-hid@0.3.1 preinstall script. npm ERR! This is most likely a problem with the node-hid package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! sh get-hidapi.sh npm ERR! You can get their info via: npm ERR! npm owner ls node-hid npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.2.9200 npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod ejs\node_modules\npm\bin\npm-cli.js" "install" "xbox-controller" npm ERR! cwd D:\Skydrive\Code\GIT\Arduino\nodebotsday2014\nodejs npm ERR! node -v v0.10.29 npm ERR! npm -v 1.4.14 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! D:\Skydrive\Code\GIT\Arduino\nodebotsday2014\nodejs\npm-debug.log npm ERR! not ok code 0 --snip-- Thanks Michael

andrew commented 10 years ago

@mjosborne1 did you manage to fix the issue you were having?