noble / node-bluetooth-hci-socket

MIT License
153 stars 188 forks source link

error while installing bluetooth-hci-socket #98

Closed payalgaikwad42 closed 6 years ago

payalgaikwad42 commented 6 years ago

i am getting this error: Uncaught Exception: Error: Cannot find module 'bluetooth-hci-socket' when i do npm install bluetooth-hci-socket

sb_bindings.target.mk:106: recipe for target 'Release/obj.target/usb_bindings/src/node_usb.o' failed make: *** [Release/obj.target/usb_bindings/src/node_usb.o] Error 1 make: Leaving directory '/home/payal/gatewaymiddleware/modules/Gateway-Middleware/node_modules/bluetooth-hci-socket/node_modules/usb/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/payal/gatewaymiddleware/modules/Gateway-Middleware/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12) gyp ERR! System Linux 4.15.0-32-generic gyp ERR! command "/usr/local/bin/node" "/home/payal/gatewaymiddleware/modules/Gateway-Middleware/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/payal/gatewaymiddleware/modules/Gateway-Middleware/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding/usb_bindings.node" "--module_name=usb_bindings" "--module_path=/home/payal/gatewaymiddleware/modules/Gateway-Middleware/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding" "--napi_version=3" "--node_abi_napi=napi" gyp ERR! cwd /home/payal/gatewaymiddleware/modules/Gateway-Middleware/node_modules/bluetooth-hci-socket/node_modules/usb gyp ERR! node -v v10.5.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@~0.1.4 (node_modules/noble/node_modules/xpc-connection): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for xpc-connection@0.1.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN enoent ENOENT: no such file or directory, open '/home/payal/gatewaymiddleware/modules/Gateway-Middleware/node_modules/usb/package.json' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: snappy@5.0.5 (node_modules/snappy): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: snappy@5.0.5 install: node-gyp rebuild npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.3.2 (node_modules/bluetooth-hci-socket/node_modules/usb): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.3.2 install: node-pre-gyp install --fallback-to-build npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 npm ERR! Linux 4.15.0-32-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "bluetooth-hci-socket" npm ERR! node v10.5.0 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE

npm ERR! bluetooth-hci-socket@0.5.1 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bluetooth-hci-socket@0.5.1 install script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the bluetooth-hci-socket package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs bluetooth-hci-socket npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls bluetooth-hci-socket npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/payal/gatewaymiddleware/modules/Gateway-Middleware/npm-debug.log

ssun83 commented 5 years ago

please tell me how you fixed this pls

indigoswann commented 5 years ago

Same