At times, when you install node using the command
sudo apt-get install nodejs
, a lower version is installed.
E.g when you type
nodejs --version
It shows
0.10.26
Therefore, to update node to the latest stable version, use n module from npm. The following commands help.
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Top comments (0)