An open API service indexing awesome lists of open source software.

https://github.com/rdjarbeng/install-nodejs-on-raspberry-pi

How to install NodeJs on the Raspberry Pi - tested on Raspberry Pi 4B
https://github.com/rdjarbeng/install-nodejs-on-raspberry-pi

internet-of-things nodejs raspberry-pi raspberry-pi-4

Last synced: 5 months ago
JSON representation

How to install NodeJs on the Raspberry Pi - tested on Raspberry Pi 4B

Awesome Lists containing this project

README

          

# Install-NodeJs-on-Raspberry-Pi
> For the more recent way of installing nodejs on the raspberry pi 4 see this link: [Installing and removing nodejs for linux based systems for raspberry pi 4B](https://rdjarbeng.com/Installing_NodeJs_16/)

> This method is the old way of installling it. Leaving it here because it still works

How to install NodeJs on the Raspberry Pi - tested on Raspberry Pi 4B using the terminal

Steps:
Assuming you have a Raspberry Pi already setup. If you need help setting up find resources [here](https://www.raspberrypi.com/documentation/computers/getting-started.html)
1. Turn on the raspberry Pi.
_Optional: If you are not using a monitor you can ssh into the Raspberry Pi and run the commands from there._
2. Open a terminal window
3. Run these commands to download node version 18.18.0 (LTS) from the terminal on the Raspberry Pi. You need to copy and paste these into the terminal or use a bash script.

### Commands
```
wget https://nodejs.org/dist/v18.18.0/node-v18.18.0-linux-armv7l.tar.xz

tar -xvf node-v18.18.0-linux-armv7l.tar.xz
cd node-v4.4.2-linux-armv7l
sudo cp -R * /usr/local/
```
### Check installation
4. To check if the NodeJs installation worked run this:
```
node –-version
```

This should print out the current NodeJs version; The commands given installed version 18.18.0. For installing packages **npm** should come installed with your version of NodeJs if you installed a recent version of NodeJs.

## Installing different Node versions
_Optional_
If you wish to change the node version to install, you can change the link in the command. Here we used version 18.18.0: `https://nodejs.org/dist/v18.18.0/node-v18.18.0-linux-armv7l.tar.xz`

but you can use any link from the [NodeJs download page](https://nodejs.org/en/download) . Use the ARM7 linux binaries link if you need to install a different version on the Raspberry pi 4B.

![image](https://github.com/RDjarbeng/Install-NodeJs-on-Raspberry-Pi/assets/57795443/e01ff866-71f4-40ca-9767-88435c5b03e8)