Home > Web Front-end > JS Tutorial > One-line command to upgrade node.js version

One-line command to upgrade node.js version

高洛峰
Release: 2016-12-28 11:19:20
Original
1197 people have browsed it

Node has a module called n (the name is short enough...), which is specially used to manage the node.js version.

First install the n module:

npm install -g n
Copy after login

The second step:

Upgrade node.js to the latest stable version

n stable
Copy after login

Isn’t it simple? !

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

n v0.10.26
Copy after login

or

n 0.10.26
Copy after login

That’s it Simple, what can we do? ? ! !

Also share a few common npm commands

npm -v          #显示版本,检查npm 是否正确安装。
 
npm install express   #安装express模块
 
npm install -g express  #全局安装express模块
 
npm list         #列出已安装模块
 
npm show express     #显示模块详情
 
npm update        #升级当前目录下的项目的所有模块
 
npm update express    #升级当前目录下的项目的指定模块
 
npm update -g express  #升级全局安装的express模块
 
npm uninstall express  #删除指定的模块
Copy after login

More one-line commands to get node.js version upgrade related articles, please pay attention to PHP Chinese website !

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template