A one line command completes the upgrade of the node.js version

  • 2020-03-30 03:33:28
  • OfStack

Node has a module called n. Node. js is specifically designed to manage the version of node.js.

First install n module:


npm install -g n

The second step:

Upgrade node.js to the latest stable version


n stable

Isn't it simple? !

N can also be followed by the version number, such as:


n v0.10.26

or


n 0.10.26

It's as simple as that. What can we do about it? !!!!!

Also share a few common NPM commands


npm -v          # Display version, check npm  Installed correctly. 

npm install express   # The installation express The module 

npm install -g express  # Global installation express The module 

npm list         # Lists installed modules 

npm show express     # Display module details 

npm update        # Upgrade all modules of the project in the current directory 

npm update express    # Upgrade the specified module of the project in the current directory 

npm update -g express  # Upgrade the global installation express The module 

npm uninstall express  # Deletes the specified module 


Related articles: