Quick and Easy guide on How to Install NodeJS and NPM (Node Package Manager) on Respberry Pi (Respbian OS)
Run the following command to get the specified version of Node installer. Here I am downloading the Node v12
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
After that Run following command
sudo apt-get install -y nodejs
Check the version numbers of node and npm to check if they are installed correctly.
node -v
npm -v