0
Q:

update node js version ubuntu

sudo npm cache clean -f
sudo npm install -g n
sudo n stable
2
npm cache clean -f

npm install -g n

install latest Node.js with npm n mmodule

Note:- With the n module installed, following you can use it to:
Install the latest stable version: n stable
Install the latest release: n latest
Install a specific version: n [version.number]
1
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt-get install -y nodejs

# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_13.x | bash -
apt-get install -y nodejs
0
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs
-1
//STEP 1:install using curl (PPA)
sudo apt update && sudo apt install curl -y
//STEP 2:install latest version (replace 14.x with requird one(i.e 15.x))
curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
sudo apt install nodejs
nodejs -v
v15.3.0
0

New to Communities?

Join the community