lsongdev / node-bluetooth

:large_blue_diamond:😬Bluetooth serial port communication for Node.js
https://npmjs.org/node-bluetooth
Other
197 stars 56 forks source link

Installation Fails #19

Closed diginfo closed 6 years ago

diginfo commented 6 years ago

Tried this many times, cannot install and the error logs don't really tell me anything !

Any idea what may be the cause ?

/root/.node-gyp/10.10.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../../nan/nan_object_wrap.h:66:61:   required from here
/root/.node-gyp/10.10.0/include/node/v8.h:9496:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
make: *** [BluetoothSerialPort.target.mk:107: Release/obj.target/BluetoothSerialPort/src/linux/BTSerialPortBinding.o] Error 1
make: Leaving directory '/usr/share/nodejs/nwjs-sdk/node_modules/node-bluetooth/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.14.69-1-lts
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /usr/share/nodejs/nwjs-sdk/node_modules/node-bluetooth
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-bluetooth@1.2.2 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-bluetooth@1.2.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-09-17T04_41_19_346Z-debug.log
lsongdev commented 6 years ago

fix in https://github.com/song940/node-bluetooth/commit/e572f9c596ee3cb0a97cce7a3e1a1ebf1c4f62b5

diginfo commented 6 years ago

Thanks for the fast response & fix, but another question: does this support ble devices as well as legacy ?

lsongdev commented 6 years ago

No test .