nodejs nvm npm commonly used commands

--- --- restore content begins

Node.js command line to get upgrade

There is a module called node n (the name can be short enough ...), is designed to manage node.js version.

N install modules:

npm install -g n

Step two:

Node.js upgrade to the latest stable version

n stable

N can also follow later version number such as:

n v0.10.26 or n 0.10.26

In addition to share a few common commands npm

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  #删除指定的模块
 
nvm install version specifies the version installed nodejs

--- end --- restore content

Node.js command line to get upgrade

There is a module called node n (the name can be short enough ...), is designed to manage node.js version.

N install modules:

npm install -g n

Step two:

Node.js upgrade to the latest stable version

n stable

N can also follow later version number such as:

n v0.10.26 or n 0.10.26

In addition to share a few common commands npm

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  #删除指定的模块
 
nvm install version specifies the version installed nodejs

Guess you like

Origin www.cnblogs.com/sdlx/p/11539741.html