Home  >  Article  >  Web Front-end  >  What are the two methods for nodejs upgrade?

What are the two methods for nodejs upgrade?

青灯夜游
青灯夜游Original
2021-11-08 15:20:534268browse

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".

What are the two methods for nodejs upgrade?

The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.

Two methods to upgrade nodejs

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!

Statement:
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