Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to install on rpi #14

Closed
janeksz opened this issue Jan 21, 2019 · 15 comments
Closed

unable to install on rpi #14

janeksz opened this issue Jan 21, 2019 · 15 comments

Comments

@janeksz
Copy link

janeksz commented Jan 21, 2019

unable to install on rpi 3 B+

@janeksz
Copy link
Author

janeksz commented Jan 23, 2019

gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/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.90-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/.node-red/node_modules/bluetooth-hci-socket
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

@janeksz
Copy link
Author

janeksz commented Jan 23, 2019

anyone can help?

@janeksz
Copy link
Author

janeksz commented Jan 30, 2019

root@janek:# service nodered stop
root@janek:
# uname -a
Linux janek 4.14.90-v7+ #1183 SMP Fri Dec 21 14:03:50 GMT 2018 armv7l GNU/Linux
root@janek:~# npm i --unsafe-perm node-red-contrib-ble-uart

[email protected] install /root/node_modules/usb
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/tessel/node-usb/releases/download/1.5.0/usb_bindings-v1.5.0-node-v64-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/root/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
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
AR(target) Release/obj.target/usb.a
COPY Release/usb.a
CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
../src/node_usb.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE SetDebugLevel(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/node_usb.cc:99:73: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
if (info.Length() != 1 || !info[0]->IsUint32() || info[0]->Uint32Value() > 4) {
^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
from ../src/node_usb.h:12,
from ../src/node_usb.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2477:47: note: declared here
V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/node_usb.cc:103:53: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
libusb_set_debug(usb_context, info[0]->Uint32Value());
^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
from ../src/node_usb.h:12,
from ../src/node_usb.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2477:47: note: declared here
V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/node_usb.cc: In function ‘void handleHotplug(std::pair<libusb_device*, libusb_hotplug_event>)’:
../src/node_usb.cc:151:58: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, const char*, int, v8::Localv8::Value)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv);
^
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/node_usb.cc:1:
../../nan/nan.h:1001:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/node_usb.cc: In function ‘v8::Localv8::Value libusbException(int)’:
../src/node_usb.cc:301:14: warning: ‘v8::Localv8::Object v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
e->ToObject()->Set(Nan::New("errno").ToLocalChecked(), Nan::New(errorno));
^
In file included from ../src/node_usb.h:12:0,
from ../src/node_usb.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
Local Value::ToObject() const {
^~~~~
CXX(target) Release/obj.target/usb_bindings/src/device.o
../src/device.cc: In static member function ‘static void Req::default_after(uv_work_t)’:
../src/device.cc:237:64: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(device, Nan::New(baton->callback), 1, argv);
^
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/device.cc:1:
../../nan/nan.h:959:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
CXX(target) Release/obj.target/usb_bindings/src/transfer.o
../src/transfer.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Transfer_Submit(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/transfer.cc:58:47: warning: ‘v8::Localv8::Object v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
Local buffer_obj = info[0]->ToObject();
^
In file included from ../src/node_usb.h:12:0,
from ../src/transfer.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
Local Value::ToObject() const {
^~~~~
../src/transfer.cc: In function ‘void handleCompletion(Transfer)’:
../src/transfer.cc:126:72: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value*)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(self->handle(), Nan::New(self->v8callback), 3, argv);
^
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/transfer.cc:1:
../../nan/nan.h:959:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
SOLINK_MODULE(target) Release/obj.target/usb_bindings.node
COPY Release/usb_bindings.node
COPY /root/node_modules/usb/src/binding/usb_bindings.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/root/node_modules/usb/build'

[email protected] install /root/node_modules/bluetooth-hci-socket
node-gyp rebuild

make: Entering directory '/root/node_modules/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value* ’ is deprecated [-Wdeprecated-declarations]
back(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h:980:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:
../src/BluetoothHciSocket.cpp:275:72: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Localv8::Value [1])’
Local error = errorConstructor->NewInstance(1, constructorArgs);
^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
from /root/.node-gyp/10.15.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/root/.node-gyp/10.15.0/include/node/v8.h:3993:44: note: candidate: v8::MaybeLocalv8::Object v8::Function::NewInstance(v8::Localv8::Context, int, v8::Localv8::Value) const
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^~~~~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:3993:44: note: candidate expects 3 arguments, 2 provided
/root/.node-gyp/10.15.0/include/node/v8.h:3996:44: note: candidate: v8::MaybeLocalv8::Object v8::Function::NewInstance(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^~~~~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:3996:44: note: candidate expects 1 argument, 2 provided
../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value ’ is deprecated [-Wdeprecated-declarations]
back(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h:980:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindRaw(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/BluetoothHciSocket.cpp:395:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
devId = arg0->IntegerValue();
^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
from /root/.node-gyp/10.15.0/include/node/node.h:63,
from /root/.node-gyp/10.15.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/root/.node-gyp/10.15.0/include/node/v8.h:2476:46: note: declared here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindUser(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/BluetoothHciSocket.cpp:417:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
devId = arg0->IntegerValue();
^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
from /root/.node-gyp/10.15.0/include/node/node.h:63,
from /root/.node-gyp/10.15.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/root/.node-gyp/10.15.0/include/node/v8.h:2476:46: note: declared here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
binding.target.mk:99: recipe for target 'Release/obj.target/binding/src/BluetoothHciSocket.o' failed
make: *** [Release/obj.target/binding/src/BluetoothHciSocket.o] Error 1
make: Leaving directory '/root/node_modules/bluetooth-hci-socket/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/npm/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.90-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node_modules/bluetooth-hci-socket
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN saveError ENOENT: no such file or directory, open '/root/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/root/package.json'
npm WARN root No description
npm WARN root No repository field.
npm WARN root No README data
npm WARN root No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/bluetooth-hci-socket):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

  • [email protected]
    added 5 packages from 5 contributors and audited 108 packages in 69.674s
    found 3 low severity vulnerabilities
    run npm audit fix to fix them, or npm audit for details
    root@janek:# service nodered stop
    root@janek:
    # npm i --unsafe-perm node-red-contrib-generic-ble

[email protected] install /root/node_modules/usb
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/tessel/node-usb/releases/download/1.5.0/usb_bindings-v1.5.0-node-v64-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/root/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
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
AR(target) Release/obj.target/usb.a
COPY Release/usb.a
CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
../src/node_usb.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE SetDebugLevel(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/node_usb.cc:99:73: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
if (info.Length() != 1 || !info[0]->IsUint32() || info[0]->Uint32Value() > 4) {
^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
from ../src/node_usb.h:12,
from ../src/node_usb.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2477:47: note: declared here
V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/node_usb.cc:103:53: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
libusb_set_debug(usb_context, info[0]->Uint32Value());
^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
from ../src/node_usb.h:12,
from ../src/node_usb.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2477:47: note: declared here
V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/node_usb.cc: In function ‘void handleHotplug(std::pair<libusb_device*, libusb_hotplug_event>)’:
../src/node_usb.cc:151:58: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, const char*, int, v8::Localv8::Value)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv);
^
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/node_usb.cc:1:
../../nan/nan.h:1001:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/node_usb.cc: In function ‘v8::Localv8::Value libusbException(int)’:
../src/node_usb.cc:301:14: warning: ‘v8::Localv8::Object v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
e->ToObject()->Set(Nan::New("errno").ToLocalChecked(), Nan::New(errorno));
^
In file included from ../src/node_usb.h:12:0,
from ../src/node_usb.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
Local Value::ToObject() const {
^~~~~
CXX(target) Release/obj.target/usb_bindings/src/device.o
../src/device.cc: In static member function ‘static void Req::default_after(uv_work_t)’:
../src/device.cc:237:64: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(device, Nan::New(baton->callback), 1, argv);
^
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/device.cc:1:
../../nan/nan.h:959:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
CXX(target) Release/obj.target/usb_bindings/src/transfer.o
../src/transfer.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Transfer_Submit(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/transfer.cc:58:47: warning: ‘v8::Localv8::Object v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
Local buffer_obj = info[0]->ToObject();
^
In file included from ../src/node_usb.h:12:0,
from ../src/transfer.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
Local Value::ToObject() const {
^~~~~
../src/transfer.cc: In function ‘void handleCompletion(Transfer)’:
../src/transfer.cc:126:72: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value*)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(self->handle(), Nan::New(self->v8callback), 3, argv);
^
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/transfer.cc:1:
../../nan/nan.h:959:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
SOLINK_MODULE(target) Release/obj.target/usb_bindings.node
COPY Release/usb_bindings.node
COPY /root/node_modules/usb/src/binding/usb_bindings.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/root/node_modules/usb/build'

[email protected] install /root/node_modules/bluetooth-hci-socket
node-gyp rebuild

make: Entering directory '/root/node_modules/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value* ’ is deprecated [-Wdeprecated-declarations]
back(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h:980:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:
../src/BluetoothHciSocket.cpp:275:72: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Localv8::Value [1])’
Local error = errorConstructor->NewInstance(1, constructorArgs);
^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
from /root/.node-gyp/10.15.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/root/.node-gyp/10.15.0/include/node/v8.h:3993:44: note: candidate: v8::MaybeLocalv8::Object v8::Function::NewInstance(v8::Localv8::Context, int, v8::Localv8::Value) const
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^~~~~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:3993:44: note: candidate expects 3 arguments, 2 provided
/root/.node-gyp/10.15.0/include/node/v8.h:3996:44: note: candidate: v8::MaybeLocalv8::Object v8::Function::NewInstance(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^~~~~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:3996:44: note: candidate expects 1 argument, 2 provided
../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value ’ is deprecated [-Wdeprecated-declarations]
back(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h:980:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindRaw(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/BluetoothHciSocket.cpp:395:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
devId = arg0->IntegerValue();
^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
from /root/.node-gyp/10.15.0/include/node/node.h:63,
from /root/.node-gyp/10.15.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/root/.node-gyp/10.15.0/include/node/v8.h:2476:46: note: declared here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindUser(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/BluetoothHciSocket.cpp:417:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
devId = arg0->IntegerValue();
^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
from /root/.node-gyp/10.15.0/include/node/node.h:63,
from /root/.node-gyp/10.15.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/root/.node-gyp/10.15.0/include/node/v8.h:2476:46: note: declared here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
binding.target.mk:99: recipe for target 'Release/obj.target/binding/src/BluetoothHciSocket.o' failed
make: *** [Release/obj.target/binding/src/BluetoothHciSocket.o] Error 1
make: Leaving directory '/root/node_modules/bluetooth-hci-socket/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/npm/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.90-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node_modules/bluetooth-hci-socket
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN saveError ENOENT: no such file or directory, open '/root/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/root/package.json'
npm WARN root No description
npm WARN root No repository field.
npm WARN root No README data
npm WARN root No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/bluetooth-hci-socket):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

  • [email protected]
    added 7 packages from 63 contributors and audited 332 packages in 61.832s
    found 10 low severity vulnerabilities
    run npm audit fix to fix them, or npm audit for details
    root@janek:~#

@dbaba
Copy link
Collaborator

dbaba commented Feb 1, 2019

Thank you for the report. The module node-bluetooth-hci-socket doesn't seem to support Node 10(See the issue).
Try Node 8 instead for the node until it support Node 10.
Leave this issue open until this node is installable on Node 10.

@janeksz
Copy link
Author

janeksz commented Feb 1, 2019

@dbaba thanks, what is the easiest way of downgrading node on RPi?

@dbaba
Copy link
Collaborator

dbaba commented Feb 1, 2019

Re-flashing an OS image (Raspbian Stretch Lite, not Desktop) then installing a specific version of Node.js is the easiest way.

I don't use the Desktop version of Raspbian so unfortunately I don't have a good suggestion for it. You can ask help on RPi forum.

@DaveOke
Copy link

DaveOke commented Mar 2, 2019

Got this working on Node 10.

  1. Git Clone
  2. edit package.json. Change noble to "@abandonware/noble": "^1.9.2-1"
  3. npm install
    3a. edit source, change noble import to: import noble from '@abandonware/noble';
  4. gulp build
  5. npm pack
  6. In node-red folder: npm install --unsafe-perm /path/to/node-red-contrib-generic-ble/node-red-contrib-generic-ble-3.0.0.tgz
  7. setcap cap_net_raw,cap_net_admin+eip $(eval readlink -f /usr/bin/node)
  8. run node-red from cmd-line. You should see: [GenericBLE] Start BLE scanning
  9. terminate, run as normal.

@dbaba
Copy link
Collaborator

dbaba commented Mar 4, 2019

Thanks @DaveOke
Let me check the steps.

@mrmurb
Copy link

mrmurb commented Mar 18, 2019

Any update on this?
This project works fine for me using @abandonware/noble as a substitute for the original version. This also fixes problems when running on node versions higher than 8 aswell.

@nishant2019
Copy link

Got this working on Node 10.

  1. Git Clone
  2. edit package.json. Change noble to "@abandonware/noble": "^1.9.2-1"
  3. npm install
    3a. edit source, change noble import to: import noble from '@abandonware/noble';
  4. gulp build
  5. npm pack
  6. In node-red folder: npm install --unsafe-perm /path/to/node-red-contrib-generic-ble/node-red-contrib-generic-ble-3.0.0.tgz
  7. setcap cap_net_raw,cap_net_admin+eip $(eval readlink -f /usr/bin/node)
  8. run node-red from cmd-line. You should see: [GenericBLE] Start BLE scanning
  9. terminate, run as normal.

I am facing issues please help.i am attaching logs

[email protected] install /home/openhabian/node-red-contrib-generic-ble/node_modules/usb

node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/tessel/node-usb/releases/download/1.3.3/usb_bindings-v1.3.3-node-v64-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error Connection closed while downloading tarball file
make: Entering directory '/home/openhabian/node-red-contrib-generic-ble/node_modules/usb/build'
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
make: Entering directory '/home/openhabian/node-red-contrib-generic-ble/node_modules/usb/build'
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
rm: cannot remove './Release/.deps/Release/obj.target/libusb/libusb/libusb/core.o.d.raw': No such file or directory
libusb.target.mk:138: recipe for target 'Release/obj.target/libusb/libusb/libusb/core.o' failed
make: *** [Release/obj.target/libusb/libusb/libusb/core.o] Error 1
make: Leaving directory '/home/openhabian/node-red-contrib-generic-ble/node_modules/usb/build'
CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.14.98+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/openhabian/node-red-contrib-generic-ble/node_modules/usb/src/binding/usb_bindings.node" "--module_name=usb_bindings" "--module_path=/home/openhabian/node-red-contrib-generic-ble/node_modules/usb/src/binding" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /home/openhabian/node-red-contrib-generic-ble/node_modules/usb
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed

@nishant2019
Copy link

Any update on this?
This project works fine for me using @abandonware/noble as a substitute for the original version. This also fixes problems when running on node versions higher than 8 aswell.

Can you please give detailed guide for setup

@DaveOke
Copy link

DaveOke commented Apr 17, 2019 via email

@nishant2019
Copy link

Just off the top of my head, using –unsafe-perm has resolved nodegyp build issues for me in the past.
were you able to install the library

@Travelbacon
Copy link

For now the solution is make a local installation by changing the source code from Github. I will show you how.

Make a git clone of this repository.
git clone https://github.com/CANDY-LINE/node-red-contrib-generic-ble.git

Edit src/generic-ble.js
In line 17 change
import noble from 'noble';
to
import noble from '@abandonware/noble';

Edit package.json
In line 62 change
"noble": "~1.8.1",
to
"@abandonware/noble": "^1.9.2-2",

Execute 'npm pack'.

Then go to node-red folder and install by
npm install /node-red-generic-ble-3.0.0 tar.gz --no-save
Restart node-red.

And of course, replace in Windows replace / with \

@dbaba dbaba closed this as completed in d202232 Jun 3, 2019
@dbaba
Copy link
Collaborator

dbaba commented Jun 3, 2019

Hi, I've just published v3.1.0 a new release including @abandonware/noble dependency.
I had experienced a weird segmentation fault after updating the dependency so I needed time to look into the issue (fortunately, I found it wasn't related to the update though).
Sorry for late release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants