Hey Everyone, my name is Rajdeep Singh. I'm a Frontend developer in India. you are interested to install npm and node.js latest version in your raspberry pi 4. Now you are right place.
Now follow these steps.
Steps:
- Update & Upgrade your pi
- ARM Version
- Go to Offical Nodejs
- Copy Link
- Extract The File
- Copy The Files Into The Directory
- Check Installation
Update & Upgrade your Pi
fastly update your raspi 4 using update commands
sudo apt-get update
after the update command, you run the upgrade command to upgrade your Raspi package.
sudo apt-get upgrade
ARM Version:
Now you check your raspi 4 arm architecture. so that we install node js and npm according to your arm architecture.
Check ARM architecture use the following command.
uname -m
Currently in my Raspberry armv7l Architecture in your case may be different.

Go to Offical NodeJS:
Firstly goto node js official download page.

Copy Link:
Once open node js download page. then Right-click on Linux Binaries (ARM) version and copy the link address.
- Without command:
Goto node js download page and click to ARMV7 button. after few second you download start it.
- With Command ( Recommanded ):
My arm Architecture is armv7l. so that, I copy ARMV7 Link Address. In Your case, your ARM Architecture armv81. so that you copy ARMV8 Link Address

wget paste-your-link
My example
wget https://nodejs.org/dist/v14.15.4/node-v14.15.4-linux-armv7l.tar.xz
Extract The File:
Once download Completed now Extract your file. you are extract files by Raspbian File manager and secondly, use the tar command according to your mind.
Your file look like:
tar -xzf node-vXX.XX.X-linux-armvXl.tar.gz
In my example my file name:
tar -xzf node-v14.15.4-linux-armv7l
Note:
if you face any error use Raspbian File manager to extract File.
Copy The Files Into The Directory:
run node js with any directory we need to copy all extracted files into the "/usr/local" folder.
Your file look like:
tar -xzf node-vXX.XX.X-linux-armvXl.tar.gz
Go to your extracted folder:
cd node-v14.15.4-linux-armv7l
After entering your folder then copy all files, we use the cp command. The "-R" flag is to signify to the program to copy all the files recursively, i.e include all files within folders. "*" just means to copy everything in the folder.
sudo cp -R * /usr/local/
Check Installation:
Now your Node js and npm successfully Install you verify your node and npm version. the simply run the following commands
node -v
npm -v
All work fine, you see node and npm version.
If you run into any issues, just leave us a comment down below and we will try to help you guys!
Reference:

https://nodejs.org/en/download/
Hire me:
Fiverr:
https://www.fiverr.com/users/officialrajdeep/
Upwork:
https://www.upwork.com/freelancers/~01a4e8ba7a41795229
Contact me
- https://www.facebook.com/officialrajdeepsingh/
- https://medium.com/officialrajdeepsingh
- officialrajdeepsingh@gmail.com