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

Cannot install bleno with nodejs 10.x in a raspberry pi zero. V8_DEPRECATED error #425

Open
nikolaof opened this issue Dec 31, 2018 · 6 comments

Comments

@nikolaof
Copy link

Hi,

I'm trying to install the bleno module for node 10.15.0 using either a package.json file or just by running the npm install bleno I'm getting the following error:

 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 '/home/pi/dev/nodejs/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 (/opt/nodejs/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.79+
gyp ERR! command "/opt/nodejs/bin/node" "/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/dev/nodejs/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 notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] license should be a valid SPDX license expression
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

It seems that it's trying to use an old bluetooth-hci-socket version that using the deprercated V8 macro

While compiling it emmited this error:

../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::Local<v8::Value> [1])’
   Local<Value> error = errorConstructor->NewInstance(1, constructorArgs);

Any idea?
Maybe the package.json should be changed in order to use the @abandonware/bluetooth-hci-socket module.

@xiongsongsong
Copy link

Yes, I also met.

@gvdhoven
Copy link

This is not an issue with bleno but with one of the used packages:
noble/node-bluetooth-hci-socket#84
noble/node-bluetooth-hci-socket#91

@schwamic
Copy link

An update to Node10 would be great!

@arthare
Copy link

arthare commented Aug 17, 2020

I can confirm changing the node-bluetooth-hci-socket dependency works. Change node-bluetooth-hci-socket to "@abandonware/bluetooth-hci-socket": "^0.5.3-5". And then update the require('bluetooth-hci-socket') to require('@abandonware/bluetooth-hci-socket')

Got it building and advertising on my raspi 4, after having the exact error posted in the OP. Have not tested extensively yet.

Changing dependency: arthare@596acd9
Changing requires: arthare@ae0034a

@nkemcels
Copy link

I'm using @abandonware/bleno with node.js 12.19 and so far everything works well.

@Dizi0
Copy link

Dizi0 commented Jan 7, 2021

I followed @arthare advices, I'm running it with NodeJs 15.5.0 like a charm, thank you.

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

7 participants