What are the two methods for nodejs upgrade?

青灯夜游
Release: 2021-11-08 15:20:53
Original
4306 people have browsed it

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
Copy after login

2 ), upgrade to the latest version

# 升级到最新版
nvm install lastest
Copy after login

3), upgrade to the stable version

# 升级到稳定版
nvm install stable
Copy after login

2, use Node Binary management module "n" to upgrade nodejs

First we need to install the n module

# 全局安装n
npm install -g n
Copy after login

and then use the following commands to upgrade:

1), upgrade to the latest stable version

# 升级到最新稳定版
n stable
Copy after login

2), upgrade to the latest version

# 升级到最新版
n latest
Copy after login

3), upgrade to the customized version

# 升级到定制版
n v7.10.0
Copy after login

[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!

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