1curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
2sudo apt-get install -y nodejs
1//First, clear the npm cache:
2 npm cache clean -f
3
4//Install n, Node’s version manager:
5 npm install -g n
6
7//With the n module installed, you can use it to:
8 Install the latest stable version: n stable
9 Install the latest release: n latest
1# Using Ubuntu
2curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
3sudo apt-get install -y nodejs
4
5# Using Debian, as root
6curl -sL https://deb.nodesource.com/setup_13.x | bash -
7apt-get install -y nodejs
8
1curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
2sudo apt-get install -y nodejs