Open jfgarciamex opened 5 years ago
Just a brief update to document after another fresh install:
After installing node.js 9.3.0 (and npm 5.5.1), need to upgrade to 6.9.0 with sudo npm install npm -g
Then before installing homebridge-ranger 0.3.4:
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
And install homebridge-ranger with:
npm install -g homebridge-ranger --unsafe-perm
Hi Guys, I am trying a fresh install on raspian, and am running into a persistent problem when trying to install homebridge-ranger. I followed the instructions above. This is what I get:
root@raspberrypi:~# npm --verbose install -g homebridge-ranger --unsafe-perm
npm info it worked if it ends with ok
npm verb cli [ '/opt/node-v9.3.0-linux-armv6l/bin/node',
npm verb cli '/usr/bin/npm',
npm verb cli '--verbose',
npm verb cli 'install',
npm verb cli '-g',
npm verb cli 'homebridge-ranger',
npm verb cli '--unsafe-perm' ]
npm info using npm@6.9.0
npm info using node@v9.3.0
npm verb npm-session 841a62157641bc2f
npm http fetch GET 200 https://registry.npmjs.org/homebridge-ranger 561ms (from cache)
npm timing stage:loadCurrentTree Completed in 1840ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 18ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 161ms
npm http fetch GET 200 https://registry.npmjs.org/ble-executor 1539ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/buffer-shims 1523ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/chalk 1519ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/clone 1557ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/curve25519-n2 1534ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/debug 1522ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/ed25519 1556ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/fast-srp-hap 1529ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/hap-nodejs 1569ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/moment 1612ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/sequential-task-queue 175ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/uuid 190ms (from cache)
npm timing stage:rollbackFailedOptional Completed in 32ms
npm timing stage:runTopLevelLifecycles Completed in 6740ms
npm verb stack Error: exited with error code: 128
npm verb stack at ChildProcess.
Any hint would be appreciated!
FYI
I've managed to get an install working without error on Raspberry PI Raspbian with Node v10.16.0 and nom 6.9.0
Ended up changing dependency for noble to https://github.com/abandonware/node-bluetooth-hci-socket.
To achieve this I had to fork homebridge-ranger
and modified a dependency as follows:
"ble-executor": "git+https://github.com/vectronic/ble-executor.git"
which in turn has a modified dependency:
"noble": "git+https://github.com/vectronic/noble.git"
which in turn has a modified dependency:
"bluetooth-hci-socket": "git+https://github.com/abandonware/node-bluetooth-hci-socket"
I'm not vouching that I have a working install (but it looks reasonably good so far).
FYI
I've managed to get an install working without error on Raspberry PI Raspbian with Node v10.16.0 and nom 6.9.0
Ended up changing dependency for noble to https://github.com/abandonware/node-bluetooth-hci-socket.
To achieve this I had to fork
homebridge-ranger
and modified a dependency as follows:
"ble-executor": "git+https://github.com/vectronic/ble-executor.git"
which in turn has a modified dependency:
"noble": "git+https://github.com/vectronic/noble.git"
which in turn has a modified dependency:
"bluetooth-hci-socket": "git+https://github.com/abandonware/node-bluetooth-hci-socket"
I'm not vouching that I have a working install (but it looks reasonably good so far).
Hello I have the same problem with the current installer. I didn't find your fork, how can I solve?
sudo npm install -g homebridge-ranger --unsafe-perm npm ERR! path git npm ERR! code ENOENT npm ERR! errno ENOENT npm ERR! syscall spawn git npm ERR! enoent Error while executing: npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/noble/noble.git npm ERR! enoent npm ERR! enoent npm ERR! enoent spawn git ENOENT npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent
@sorriso93 Workaround:
sudo npm install -g --unsafe-perm @abandonware/bluetooth-hci-socket
sudo su
sudo npm install -g homebridge-ranger --unsafe-perm
cp -r /usr/local/lib/node_modules/@abandonware/bluetooth-hci-socket /usr/local/lib/node_modules/homebridge-ranger/node_modules/
sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)
changing dependency for noble to https://github.com/abandonware/node-bluetooth-hci-socket
fork "homebridge-ranger" and modify a dependency in "package.json" as follows: "ble-executor": "git+https://github.com/my git user/ble-executor.git"
fork "ble-executor" and modify a dependency in "package.json" as follows: "noble": "git+https://github.com/abandonware/noble.git"
this works for node 10 (tested /w 10.18.1)
changing dependency for noble to https://github.com/abandonware/node-bluetooth-hci-socket
- fork "homebridge-ranger" and modify a dependency in "package.json" as follows: "ble-executor": "git+https://github.com//ble-executor.git"
- fork "ble-executor" and modify a dependency in "package.json" as follows: "noble": "git+https://github.com/abandonware/noble.git"
this works for node 10 (tested /w 10.18.1)
thanks as soon as I have time I will try again on my homebridge. I let you know
changing dependency for noble to https://github.com/abandonware/node-bluetooth-hci-socket
- fork "homebridge-ranger" and modify a dependency in "package.json" as follows: "ble-executor": "git+https://github.com//ble-executor.git"
- fork "ble-executor" and modify a dependency in "package.json" as follows: "noble": "git+https://github.com/abandonware/noble.git"
this works for node 10 (tested /w 10.18.1)
Hello till installation of @abandonware/bluetooth-hci-socket all ok. Then trying to install homebridge-ranger I get same error. Probably I have to git clone (fork) your repository for homebridge-ranger and "ble-executor but then, probably is a stupid question, how can I install via npm the local plugin instead of the official repository? thanks
Look at https://github.com/palasinio/homebridge-ranger/blob/master/package.json for an example or try to install palasinio/homebridge-ranger. If you do it yourself, you have to fork ble-executor and ranger. This „ "ble-executor": "git+https://github.com//ble-executor.git"“ should be „ "ble-executor": "git+https://github.com/your github user/ble-executor.git"“. Afterwards you need to install your modified version with npm install yourgituser/homebridge-ranger (maybe -g —unsafepermissions)..
sudo npm install -g --unsafe-perm palasinio/homebridge-ranger
This version will install with Node 12
sudo npm install -g --unsafe-perm palasinio/homebridge-ranger
This version will install with Node 12
root@RASPB3DIETPI:~# node -v v12.16.1 root@RASPB3DIETPI:~# npm -v 6.13.4
I get this error... sorry (lot of rows, only reported the first)
sudo npm install -g --unsafe-perm palasinio/homebridge-ranger npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/os-homedir-0cee5679/package.json' npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/os-homedir-0cee5679/index.js' npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/os-homedir-0cee5679/license' npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/os-homedir-0cee5679/readme.md' npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/minimist-603de8be/example/parse.js' npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/minimist-603de8be/readme.markdown'
Finally I've got it. Probably it was the distribution I used (dietpi). with raspbian lite seems ok, at least now it is installed! thanks
Ok it extend my koogeek contact sensor but the state doesn't get updated if I open the window...
Hey @palasinio - can you take a look at https://github.com/grover/homebridge-ranger/issues/43 please?
@gewaechshaus: added the fixes from #43 to: sudo npm install -g --unsafe-perm palasinio/homebridge-ranger
in my case EVE Thermo is not working /w HB > 1.2.5. Maybe you give it a try ;)
Hi @grover , just found a problem during a fresh installing and I fixed it. I would document for future reference:
After that I executed npm install -g homebridge --unsafe-perm
I got it working. I noticed that NPM was updated from 5.5.1 to 6.9.0, so I'm guessing that may be the only thing I had to do. I will try tomorrow on a new fresh install and report back. Thanks!