Installing Using a PPA
cd ~
curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs
To check which version of Node.js you have installed after these initial steps, type:
nodejs -v
Output
v10.22.0
npm -v
Output
6.14.6