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

Help me fix this issue :( Error: Cannot find module 'bluetooth-hci-socket' #49

Open
jinggo900 opened this issue Mar 12, 2019 · 5 comments

Comments

@jinggo900
Copy link

root@anonymous:~/btlejuice# btlejuice-proxy
internal/modules/cjs/loader.js:583
throw err;
^

Error: Cannot find module 'bluetooth-hci-socket'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/root/local/lib/node_modules/btlejuice/node_modules/noble/lib/hci-socket/hci.js:6:26)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
root@anonymous:~/btlejuice#

@henrikschnor
Copy link

The module doesn't seem to build properly with newer versions of nodejs, at least this was the issue for me. As a workaround I installed Node.js v8.x and installed btlejuice with the command sudo npm install --unsafe-perm -g btlejuice.

@shoxxdj
Copy link

shoxxdj commented Jul 29, 2019

If it helps,
I had the same issue on archlinux, i've tried all the solutions in the different issues related to this bug and finaly solved with :

sudo  npm i -g @abandonware/bluetooth-hci-socket
cd /usr/lib/node_modules
sudo mv @abandonware/bluetooth-hci-socket .
sudo npm i -g btlejuice --unsafe-perm

The basic bluetooth-hci-socket is not maintained I guess ( last version from 2016 )

@MoistZuko
Copy link

The module doesn't seem to build properly with newer versions of nodejs, at least this was the issue for me. As a workaround I installed Node.js v8.x and installed btlejuice with the command sudo npm install --unsafe-perm -g btlejuice.

Using node.js v8.x and --unsafe-perm command works on my Ubuntu20.04.Thanks

@R44wk
Copy link

R44wk commented Jun 23, 2021

If it helps,
I had the same issue on archlinux, i've tried all the solutions in the different issues related to this bug and finaly solved with :

sudo  npm i -g @abandonware/bluetooth-hci-socket
cd /usr/lib/node_modules
sudo mv @abandonware/bluetooth-hci-socket .
sudo npm i -g btlejuice --unsafe-perm

The basic bluetooth-hci-socket is not maintained I guess ( last version from 2016 )

Thanks, the solution worked for me on Kali

@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, exactly as shown by OP, 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

6 participants