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

error while installing bleno, hci-socket-error, #59

Open
valerianwatson opened this issue Feb 21, 2020 · 2 comments
Open

error while installing bleno, hci-socket-error, #59

valerianwatson opened this issue Feb 21, 2020 · 2 comments

Comments

@valerianwatson
Copy link

Hi everybody,

I am having an installation issue that is killing me.
I want to install bleno on my raspberry pi 3b+ running raspbian buster. I used

npm install bleno

But I get the following error mnessages:

gyp WARN EACCES current user ("pi") does not have permission to access the dev dir "/root/.cache/node-gyp/12.16.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/bleproject/node_modules/bluetooth-hci-socket/.node-gyp"

...
../src/BluetoothHciSocket.cpp: In static member function ‘static void BluetoothHciSocket::Init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
../src/BluetoothHciSocket.cpp:128:82: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
   target->Set(Nan::New("BluetoothHciSocket").ToLocalChecked(), tmpl->GetFunction());

...
../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);

...
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:311:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.75-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/bleproject/node_modules/bluetooth-hci-socket
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/bleproject/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@~0.1.4 (node_modules/bleno/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 enoent ENOENT: no such file or directory, open '/home/pi/bleproject/package.json'
npm WARN bleproject No description
npm WARN bleproject No repository field.
npm WARN bleproject No README data
npm WARN bleproject No license field.
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 4 packages from 5 contributors and audited 107 packages in 59.06s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities

I tried installing bleno with alll kinds of node versions (different versions v12.x, v13.x, v10.x, v8.x, v11.x with nvm), none seem to work. It also seems like it has something to do with bluetooth-hci-socket that apparently can't be found.
I've tried installing it a bunch of time but I get similar errors, also this gyp ERR! stack Error: make failed with exit code: 2.

I'm grateful for any help!

@caioluders
Copy link

Same here looks like the npm package is broken

@jsmif
Copy link

jsmif commented Apr 23, 2024

FWIW I used the instructions from here: https://www.blackhillsinfosec.com/machine-in-the-middle-mitm-ble-attack/ to install npm 8.17.0 and bleno and noble and then I installed btlejuice with sudo npm install --unsafe-perm btlejuice and then I got errors about it not being able to find bluetooth-hci-socket so I installed that with sudo npm install -g --unsafe-perm bluetooth-hci-socket (if I didn't use the -g it continued to complain that it couldn't find it.)

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

3 participants