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

Crashing on startup #2

Closed
djensenius opened this issue Mar 24, 2018 · 18 comments
Closed

Crashing on startup #2

djensenius opened this issue Mar 24, 2018 · 18 comments

Comments

@djensenius
Copy link

I’m getting this error:

[2018-3-24 14:17:46] ERROR LOADING PLUGIN homebridge-mi-flower-care:
[2018-3-24 14:17:46] Error: Cannot find module '../build/Release/binding.node'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-mi-flower-care/node_modules/bluetooth-hci-socket/lib/native.js:3:15)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
[2018-3-24 14:17:46] ====================```
@honkmaster
Copy link
Owner

Which Pi are you using? have you installed the required packages?

@djensenius
Copy link
Author

Pi 3.

I’ve installed the required packages.
Running as root.

Wondering if it’s calling binding.node correctly or if I need to install that by source?

@honkmaster
Copy link
Owner

Could you check

ln -s nodejs node

@djensenius
Copy link
Author

djensenius commented Mar 24, 2018

ln: failed to create symbolic link 'node': File exists```

root@raspberrypi:/usr/bin# node --version
v8.10.0```

@honkmaster
Copy link
Owner

I am very new to node, and thus have no further idea.

@honkmaster
Copy link
Owner

Ou could check issues from other projects such as:

reelyactive/pi-suite#1
noble/bleno#140

Maybe they help.

@djensenius
Copy link
Author

Found the problem was that I needed to do this:

npm install --unsafe-perm -g bluetooth-hci-socket

@honkmaster
Copy link
Owner

Perfect. Will add this later to a FAQ.

@orilpik
Copy link

orilpik commented Mar 24, 2018

@djensenius Thanks man! It works for me now!!

@Bankaifan
Copy link

Bankaifan commented Apr 21, 2018

Ich bekomme einen ähnlichen Fehler beim Booten

Musste heute die HB neu aufsetzen. Habe ich genau an die Anleitung gehalten. Leider ohne erfolgt.
Ich habe mich auf diese Anleitung verlassen https://smartapfel.de/anleitung-homebridge-auf-einem-raspberry-pi-einrichten/

Den Vorschlag von djensenius habe ich bereits versucht.

[2018-4-21 23:42:05] ====================
[2018-4-21 23:42:05] ERROR LOADING PLUGIN homebridge-mi-flower-care:
[2018-4-21 23:42:05] Error: Cannot find module '../build/Release/binding.node'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
at Function.Module._load (internal/modules/cjs/loader.js:475:25)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object. (/usr/local/lib/node_modules/homebridge-mi-flower-care/node_modules/bluetooth-hci-socket/lib/native.js:3:15)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object. (/usr/local/lib/node_modules/homebridge-mi-flower-care/node_modules/bluetooth-hci-socket/index.js:8:20)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
[2018-4-21 23:42:05] ====================

@honkmaster
Copy link
Owner

Have you tried:

npm install --unsafe-perm -g bluetooth-hci-socket

Are you running HB as root?

@Bankaifan
Copy link

Bankaifan commented Apr 22, 2018 via email

@honkmaster
Copy link
Owner

Is this issue still relevant?

@Bankaifan
Copy link

Yes.
It seems the problem is, that the node-bluetooth-hci-socket does not work with the current node releases.
It seems that the developer does no longer work on it.
noble/node-bluetooth-hci-socket#84

@huczas
Copy link

huczas commented Feb 21, 2019

same problem for me, is there a workaround for this problem?
node -v
v11.10.0
and when I try to install node-bluetooth-hci-socket

sudo npm install --unsafe-perm -g bluetooth-hci-socket

> [email protected] install /usr/lib/node_modules/bluetooth-hci-socket/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.5.0/usb_bindings-v1.5.0-node-v67-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v67 ABI, glibc) (falling back to source compile with node-gyp)

no clue how to install this plugin :(

@Nastras
Copy link

Nastras commented Feb 24, 2019

For me the same Problem with Node 10.

binding.target.mk:103: die Regel für Ziel „Release/obj.target/binding/src/BluetoothHciSocket.o“ scheiterte make: *** [Release/obj.target/binding/src/BluetoothHciSocket.o] Fehler 1 make: Verzeichnis „/usr/local/lib/node_modules/bluetooth-hci-socket/build“ wird verlassen gyp ERR! build error gyp ERR! stack Error: makefailed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/share/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.9.0-8-amd64 gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/bluetooth-hci-socket gyp ERR! node -v v10.15.1 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install:node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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/2019-02-24T07_26_47_589Z-debug.log
`

sudo npm install --unsafe-perm -g bluetooth-hci-socket
it does not work -.-

@honkmaster
Copy link
Owner

Node 10 is not supported atm. Please submit a PR if you need Node 10 or higher. You can orient yourself on https://github.com/hannseman/homebridge-mi-hygrothermograph. I do not have time to provide / implement the required changes.

@honkmaster
Copy link
Owner

Closed as the plugin now supports the latest node.

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