Comments (10)
My first guess would be that the dependency installation didn't go through correctly. Could you try removing the node_modules
folder and then running npm install
again?
from room-assistant.
Thanks for the answer but it doesn't solve.
I forgot to say that I have to install with
sudo npm install --unsafe-perm
If I don't use the --unsafe-perm parameter I get this error during installation:
> [email protected] install /home/room-assistant/node_modules/bignum
> node-gyp configure build
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/6.11.5"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp"
from room-assistant.
I've started from scratch...
flashed an sd card with hassbian
apt-get update / apt-get upgrade
installed latests version of nodejs 9.8.0
installed dependencies:
sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev libusb-1.0-0-dev
cloned room assistant.
Then if I run: sudo npm install
I get
pi@hassbian:/home/room-assistant $ sudo npm install
> [email protected] install /home/room-assistant/node_modules/bignum
> node-gyp configure build
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/9.8.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/room-assistant/node_modules/bignum/.node-gyp"
gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/room-assistant/node_modules/bignum/.node-gyp/9.8.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/room-assistant/node_modules/bignum/.node-gyp"
gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/room-assistant/node_modules/bignum/.node-gyp/9.8.0"
...endlessly
If I run: sudo npm install -g
I get
pi@hassbian:/home/room-assistant $ sudo npm install -g
npm WARN lifecycle [email protected]~install: cannot run in wd %s %s (wd=%s) [email protected] node-gyp configure build /home/room-assistant/node_modules/bignum
npm WARN lifecycle [email protected]~install: cannot run in wd %s %s (wd=%s) [email protected] node-pre-gyp install --fallback-to-build /home/room-assistant/node_modules/usb
npm WARN lifecycle [email protected]~install: cannot run in wd %s %s (wd=%s) [email protected] node-gyp rebuild /home/room-assistant/node_modules/bluetooth-hci-socket
npm WARN lifecycle [email protected]~install: cannot run in wd %s %s (wd=%s) [email protected] prebuild-install || node-gyp rebuild /home/room-assistant/node_modules/node-hid
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): /home/room-assistant/node_modules/xpc-connection is not a child of /usr/lib
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (../../home/room-assistant/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"})
+ [email protected]
added 248 packages in 37.87s
And if I run: sudo npm install --unsafe-perm -g
I get
pi@hassbian:/home/room-assistant $ sudo npm install -g --unsafe-perm
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/room-assistant/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"})
+ [email protected]
updated 1 package in 8.101s
Maybe the problem is is hassbian?
from room-assistant.
The only thing different from the instructions that I see here is you running npm install
as sudo
, which shouldn't be needed and may cause file permission issues depending on the situation. Everything else looks good to me. Possibly you should run sudo rm -R node_modules/
in the room-assistant directory to clear out the local dependency folder and then run npm install
as the pi user, without sudo
.
Technically Hassbian shouldn't be an issue since it is based on the normal Raspbian - which works fine for all my devices. If this doesn't work out for you I'll debug this further with an actual Hassbian instance.
(sorry for being slow with answering lately)
from room-assistant.
I had this same issue on 9.8 running on a Pi Zero W.
I ended up downgrading to 6.11.5 and had great success.
Good luck.
from room-assistant.
I have same problem:
error:
usb_bindings.target.mk:104: recipe for target 'Release/obj.target/usb_bindings/src/node_usb.o' failed
make: *** [Release/obj.target/usb_bindings/src/node_usb.o] Error 1
make: Leaving directory '/home/pi/room-assistant/node_modules/usb/build'
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:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:180:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Linux 4.9.80+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/room-assistant/node_modules/usb/src/binding/usb_bindings.node" "--module_name=usb_bindings" "--module_path=/home/pi/room-assistant/node_modules/usb/src/binding"
gyp ERR! cwd /home/pi/room-assistant/node_modules/usb
gyp ERR! node -v v9.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/room-assistant/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/pi/room-assistant/node_modules/usb/src/binding' (1)
node-pre-gyp ERR! stack at ChildProcess. (/home/pi/room-assistant/node_modules/usb/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:180:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:936:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
node-pre-gyp ERR! System Linux 4.9.80+
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/pi/room-assistant/node_modules/usb/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/room-assistant/node_modules/usb
node-pre-gyp ERR! node -v v9.11.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/room-assistant/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/pi/room-assistant/node_modules/usb/src/binding' (1)
Im going right with readme instruction
from room-assistant.
@mredone have you tried rolling back your node version?
from room-assistant.
Now i roll back to 6.11.5 and everything works fine.
from room-assistant.
Error occurs in node 10... but working in 9.11.1
latest rasbian. Pi Zero W (arm v6)
node installed like this:
https://www.thepolyglotdeveloper.com/2018/03/install-nodejs-raspberry-pi-zero-w-nodesource/
worked out of the box
from room-assistant.
I had exactly the same issue on a raspberry Pi, and I noticed that the room-assistant folder is owned by root after I did git clone. I did sudo chown -R pi:pi ~/room-assistant
and run the commands again.
All worked after that
from room-assistant.
Related Issues (20)
- iOS Room Assistant App is not keeping the BLE alive for detection HOT 36
- Bluetooth stops working on multiple pi's after some time, reset fails HOT 15
- BLE input via MQTT integration
- room-assistant stopped working on Home Assistant HOT 9
- Pi Zero W service restarting constantly HOT 7
- Is room-assistant no longer maintained? HOT 8
- BLE ID changes with every restart - identification via peripheral designation possible?
- rpi4 with bullseye doesn't get mdns to work with room-assistant HOT 3
- Compatibility with other HomeAutomation Systems HOT 1
- Room Assistant wont start HOT 1
- - error - HomeAssistantService: connect ECONNREFUSED HOT 1
- Stuck on installing on raspzero HOT 2
- Please make it possible (and clearly document) to reduce loglevel from INFO to WARNING.
- Room Assistant hanging HOT 6
- Home assistant complaints about MQTT entity names HOT 25
- Missing devices (working in HomeAssistant iBeacon integration) HOT 3
- TP-Link Bluetooth adapter doesn't properly work on RPi 4 on HAOS HOT 1
- MQQT is connected but shows now devices HOT 1
- Extend bluetooth control reach and control local arduino. HOT 1
- Raspberri Pi Zero broken installation script in docs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from room-assistant.