update node windows code example
Example 1: update nodejs
npm cache clean -f
npm install -g n
Install the latest stable version: n stable
Install the latest release: n latest
Example 2: update node ubuntu
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Example 3: how to update node js version
>node -v
>npm install -g n
>n stable
>n 10.16.0
Example 4: how to update node in ubuntu 18.04
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs