Coder Social home page Coder Social logo

ble issue about room-assistant HOT 10 CLOSED

mkerix avatar mkerix commented on May 20, 2024
ble issue

from room-assistant.

Comments (10)

mKeRix avatar mKeRix commented on May 20, 2024

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.

vash3d avatar vash3d commented on May 20, 2024

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.

vash3d avatar vash3d commented on May 20, 2024

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.

mKeRix avatar mKeRix commented on May 20, 2024

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.

nemmeh avatar nemmeh commented on May 20, 2024

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.

mredone avatar mredone commented on May 20, 2024

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.

nemmeh avatar nemmeh commented on May 20, 2024

@mredone have you tried rolling back your node version?

from room-assistant.

mredone avatar mredone commented on May 20, 2024

Now i roll back to 6.11.5 and everything works fine.

from room-assistant.

voglster avatar voglster commented on May 20, 2024

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.

madrose avatar madrose commented on May 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.