Two methods for node upgrade: 1. Use NVM tool, syntax "nvm install lastest", "nvm install stable"; 2. Use Node Binary management module, syntax "n stable", "n latest" or "n version number".
The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.
1. Use NVM to upgrade nodejs
First download and install nvm from github, And configure the project to the environment variable
Then use the following commands to perform the upgrade operation:
1), upgrade to the customized version
# 升级到到定制版 nvm install 7.10.0
2 ), upgrade to the latest version
# 升级到最新版 nvm install lastest
3), upgrade to the stable version
# 升级到稳定版 nvm install stable
2, use Node Binary management module "n" to upgrade nodejs
First we need to install the n module
# 全局安装n npm install -g n
and then use the following commands to upgrade:
1), upgrade to the latest stable version
# 升级到最新稳定版 n stable
2), upgrade to the latest version
# 升级到最新版 n latest
3), upgrade to the customized version
# 升级到定制版 n v7.10.0
[Recommended learning: "nodejs Tutorial》】
The above is the detailed content of What are the two methods for nodejs upgrade?. For more information, please follow other related articles on the PHP Chinese website!