How I install NodeJS on a raspberry pi
After the raspberry pi setup, login via SSH and update your system packages to the latest.
sudo apt-get update
sudo apt-get dist-upgrade
Let's install the latest stable NodeJS. We'll retrieve the NodeJS source files using curl.
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
We can check the NodeJS installation by running the command
node -v