Comments (4)
@tompropst thanks for reporting.
Was the node-usb
dependency failing? It's optional, so shouldn't be an issue.
Could you please share the console output and npm-debug log of the failure?
from node-bluetooth-hci-socket.
@sandeepmistry, I don't recall which package the failure was occurring in. I saw a specific reference to libudev.h not found, installed that dependency, and viola. I'll try to reproduce it.
from node-bluetooth-hci-socket.
@sandeepmistry here are the reproduction steps and error information.
- Clean Ubuntu install.
- Install Node.js.
sudo apt-get install nodejs
- Create
node
symlink tonodejs
.- This was required to avoid an issue with gyp.
sudo ln -s /usr/bin/nodejs /usr/bin/node
- Install NPM.
sudo apt-get install npm
- Attempt
bluetooth-hci-socket
install.npm install bluetooth-hci-socket
npm http GET https://registry.npmjs.org/bluetooth-hci-socket
npm http 304 https://registry.npmjs.org/bluetooth-hci-socket
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/usb
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/usb
npm http GET https://registry.npmjs.org/ms/0.7.1
npm http 304 https://registry.npmjs.org/ms/0.7.1
> [email protected] install /home/plarray/code/node_modules/bluetooth-hci-socket/node_modules/usb
> node-pre-gyp install --fallback-to-build
node-pre-gyp http GET https://tessel-builds.s3-us-west-2.amazonaws.com/pre-gyp/usb/v1.0.6/usb_bindings-v1.0.6-node-v11-linux-x64.tar.gz
node-pre-gyp http 404 https://tessel-builds.s3-us-west-2.amazonaws.com/pre-gyp/usb/v1.0.6/usb_bindings-v1.0.6-node-v11-linux-x64.tar.gz
node-pre-gyp http Pre-built binary not available for your system, looked for https://tessel-builds.s3-us-west-2.amazonaws.com/pre-gyp/usb/v1.0.6/usb_bindings-v1.0.6-node-v11-linux-x64.tar.gz (falling back to source compile with node-gyp)
make: Entering directory `/home/plarray/code/node_modules/bluetooth-hci-socket/node_modules/usb/build'
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
CC(target) Release/obj.target/libusb/libusb/libusb/io.o
CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
../libusb/libusb/os/threads_posix.c:24:0: warning: "_GNU_SOURCE" redefined [enabled by default]
# define _GNU_SOURCE
^
<command-line>:0:0: note: this is the location of the previous definition
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
../libusb/libusb/os/linux_udev.c:40:21: fatal error: libudev.h: No such file or directory
#include <libudev.h>
^
compilation terminated.
make: *** [Release/obj.target/libusb/libusb/libusb/os/linux_udev.o] Error 1
make: Leaving directory `/home/plarray/code/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 (/usr/share/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.19.0-26-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "build" "--fallback-to-build" "--module=/home/plarray/code/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding/usb_bindings.node" "--module_name=usb_bindings" "--module_path=/home/plarray/code/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding"
gyp ERR! cwd /home/plarray/code/node_modules/bluetooth-hci-socket/node_modules/usb
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp build --fallback-to-build --module=/home/plarray/code/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/plarray/code/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/plarray/code/node_modules/bluetooth-hci-socket/node_modules/usb/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:743:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:5)
node-pre-gyp ERR! System Linux 3.19.0-26-generic
node-pre-gyp ERR! command "node" "/home/plarray/code/node_modules/bluetooth-hci-socket/node_modules/usb/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/plarray/code/node_modules/bluetooth-hci-socket/node_modules/usb
node-pre-gyp ERR! node -v v0.10.25
node-pre-gyp ERR! node-pre-gyp -v v0.6.4
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp build --fallback-to-build --module=/home/plarray/code/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/plarray/code/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding' (1)
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 WARN optional dep failed, continuing [email protected]
> [email protected] install /home/plarray/code/node_modules/bluetooth-hci-socket
> node-gyp rebuild
make: Entering directory `/home/plarray/code/node_modules/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
SOLINK_MODULE(target) Release/obj.target/binding.node
SOLINK_MODULE(target) Release/obj.target/binding.node: Finished
COPY Release/binding.node
make: Leaving directory `/home/plarray/code/node_modules/bluetooth-hci-socket/build'
[email protected] node_modules/bluetooth-hci-socket
├── [email protected]
└── [email protected] ([email protected])
At this point, installing libudev-dev
and retrying results in success.
from node-bluetooth-hci-socket.
@tompropst this is fine, as node-usb
is an optional dependency on Linux, it's only needed on windows.
npm WARN optional dep failed, continuing [email protected]
I've added a note in the read me for this.
from node-bluetooth-hci-socket.
Related Issues (20)
- Segfaults/assertion errors (when no BT hardware is available?) HOT 1
- Failed Install - Win 10 HOT 1
- Error: No compatible USB Bluetooth 4.0 device found! HOT 1
- Dell precision m4800 Error: No compatible USB Bluetooth 4.0 device found!
- TypeError: Cannot read property 'endpoint' of undefined HOT 1
- . HOT 1
- Maintenance status ? HOT 6
- Add new device HOT 2
- Adapter unavailable in windows bluetooth settings
- Issues with bluetooth adapter 4.2 and 5.0
- raspberry pi3 HOT 3
- Installation fails in Docker-iobroker container on Raspi4 running Raspbian Buster HOT 1
- Add new device intel wireless bluetooth USB\VID_8087&PID_0AAA HOT 1
- Unable to install on Linux Mint HOT 1
- Adapter not found HOT 1
- Error : LIBUSB_ERROR_ACCES HOT 1
- Can’t install HOT 1
- Socket.write not writing commands HOT 1
- Installation fails (Arch Linux, node-gyp 9.3.0) HOT 3
- I need a C++ for windows sample
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-bluetooth-hci-socket.