To install nodejs and npm on your machine, please follow these steps:
Installing NodeJs from nodesource
Node.js package is available in the LTS and current release. According to your needs, you can select which version you would like to install. We’ll install Nodejs 13 which is the current version.
sudo apt-get install curl curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash - sudo apt-get install nodejs
Check NodeJs and NPM Version
After installing nodejs, now we can verify the installed version.
node -v # v13.9.0
npm -v # 6.13.7