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//check node version
2>node -v
3// let's install a program called n that will let us easily switch
4//between Node versions.
5>npm install -g n
6//Upgrading to the latest stable version
7>n stable
8//Changing to a specific version
9>n 10.16.0
10
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