Node has a module called n (this name can be short enough...), which is specially used to manage node.js versions.
First install n modules:
npm install -gn
Step 2:
Upgrade node.js to the latest stable version
n stable
Isn't it very simple? !
The version number can also be followed by n, for example:
n v0.10.26
or
n 0.10.26
It's that simple, what should I do? ? ! !
Also share a few common npm commands
npm -v #Show the version, check whether npm is installed correctly. npm install express #install express module npm install -g expression #Global installation of express module npm list #list installed module npm show express #Show express module npm update #Update all modules of projects in the current directory npm update expression #Update specified modules of projects in the current directory npm update -g expression #Update global installed express module npm uninstall express #Delete specified modules