Skip to content

Instantly share code, notes, and snippets.

@Koenkk
Last active February 15, 2023 20:50
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Koenkk/11fe6d4845f5275a2a8791d04ea223cb to your computer and use it in GitHub Desktop.
Save Koenkk/11fe6d4845f5275a2a8791d04ea223cb to your computer and use it in GitHub Desktop.
Install Node.js 10 on Raspberry Pi 1 or zero
NODE=10.17.0
wget https://nodejs.org/dist/v$NODE/node-v$NODE-linux-armv6l.tar.xz
tar -xvf node-v$NODE-linux-armv6l.tar.xz
sudo cp -R node-v$NODE-linux-armv6l/* /usr/local/
rm -rf node-v$NODE-linux-armv6l node-v$NODE-linux-armv6l.tar.xz
@Karevski
Copy link

Karevski commented Nov 30, 2019

10.17.0 gives a 404 error
maybe
NODE=10.17.0
wget https://nodejs.org/dist/v10.17.0/node-v10.17.0-linux-armv6l.tar.xz
tar -xvf node-v10.17.0-linux-armv6l.tar.xz
sudo cp -R node-v10.17.0-linux-armv6l/* /usr/local/
rm -rf node-v10.17.0-linux-armv6l node-v10.17.0-linux-armv6l.tar.xz

@estebanz01
Copy link

Nodejs support for raspberry pi is now on experimental, which kind of sucks, but you can get the latest builds from here: https://unofficial-builds.nodejs.org/download/release/

@rodrigograca31
Copy link

Based on the information that @estebanz01 just shared I wrote an updated article on How to install the latest NodeJS on Raspberry PI 0 W

@theNizo
Copy link

theNizo commented Mar 30, 2021

10.17.0 gives a 404 error
maybe
NODE=10.17.0
wget https://nodejs.org/dist/v10.17.0/node-v10.17.0-linux-armv6l.tar.xz
tar -xvf node-v10.17.0-linux-armv6l.tar.xz
sudo cp -R node-v10.17.0-linux-armv6l/* /usr/local/
rm -rf node-v10.17.0-linux-armv6l node-v10.17.0-linux-armv6l.tar.xz

Not sure if you got the solution by now, but in case someone else wonders: I guess you didn't paste the first line. It's a variable that will be used in the other lines.

@audstanley
Copy link

This might be of some help. 😄

@remussamoila
Copy link

Hi!
Can you help me find the culprit from my debian 11 install?
extract from the log is>
zigbee2mqtt.service: Main process exited, code=exited, status=1/FAILURE
zigbee2mqtt.service: Failed with result 'exit-code'.
zigbee2mqtt.service: Scheduled restart job, restart counter is at 97.
Stopped zigbee2mqtt.
Started zigbee2mqtt.
ERROR: npm v9.4.2 is known not to run on Node.js v12.22.12. You'll need to
upgrade to a newer Node.js version in order to use this version of npm. This
version of npm supports the following node versions: ^14.17.0 || ^16.13.0 || npm[20872]: >=18.0.0. You can find the latest version at https://nodejs.org/.

also node -v
v18.14.0
npm -v
9.5.0

also config
[Unit]
Description=zigbee2mqtt
After=network.target

[Service]
Environment=NODE_ENV=production
ExecStart=npm start
WorkingDirectory=/opt/zigbee2mqtt
StandardOutput=inherit
StandardError=inherit

Or use StandardOutput=null if you don't want Zigbee2MQTT messages filling syslog, for more options see systemd.exec(5)

Restart=always
RestartSec=10s
User=remus

[Install]
WantedBy=multi-user.target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment