homebridge/homebridge-raspbian-image

NPM missing -> how to reinstall

cl4udiu5 opened this issue · 3 comments

Raspberry Pi Model

Raspberry Pi 1 B

Current Situation

Bildschirmfoto 2023-05-03 um 16 03 16

Homebridge UI showing all details, also Node.js version.
When entering node -v in SSH Terminal I get 18.15.0.
which node shows "/usr/local/bin/node"

Installed Homebridge image with Pi Imager. Where is the right path, where version 18.16.0 is installed?

Bildschirmfoto 2023-05-03 um 16 07 50

How can I reinstall NPM because it seems to be missing?
Without NPM I can't install or update plugins for example.

Bildschirmfoto 2023-05-03 um 16 11 47

Maybe this one is also helpful for you.

Thanks for your help.

Homebridge runs within it own directory structure, with its own versions of node and npm.

If you sudo hb-shell, you enter that directory structure. Then you can find npm etc.

This is from v1.0.40

pi@homebridge:/var/lib/homebridge $ node -v
v18.16.0
pi@homebridge:/var/lib/homebridge $ npm -v
9.5.1
pi@homebridge:/var/lib/homebridge $ 
pi@homebridge:/var/lib/homebridge $ 
pi@homebridge:/var/lib/homebridge $ which npm
/opt/homebridge/bin/npm
pi@homebridge:/var/lib/homebridge $ which node
/opt/homebridge/bin/node

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been closed as no further activity has occurred.