Home > Web Front-end > JS Tutorial > How to change nodejs version

How to change nodejs version

青灯夜游
Release: 2021-11-30 17:27:29
Original
13633 people have browsed it

Change method: 1. Use the nvm tool and execute the "nvm install specified version number" command to switch to the specified version, and the "nvm install lastest" command to upgrade to the latest version; 2. Use the Node Binary management module, Execute the "n specify version number" command to switch to the specified version.

How to change nodejs version

The operating environment of this tutorial: linux5.9.8 system, nodejs version 12.19.0, DELL G3 computer.

Sometimes we need to be forced to upgrade or downgrade the nodejs version. At this time, the problem arises. How to do it. The summary is as follows. There are two types found in total. The following is the change of the nodejs version in these two cases. Let me talk about it, nvm and n are both nodejs version management libraries, and you can use them all depending on your personal habits.

Method 1, use nvm tool

1), switch to the specified version

nvm install 指定版本号
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

Method 2: Use n tool

Node Binary management module "n" can be used A very simple way to manage your Node version

1), modify the version

n 指定版本号
Copy after login

2), upgrade to the latest stable version

n stable
Copy after login

3), Upgrade to the latest version

n latest
Copy after login

For more node-related knowledge, please visit: nodejs tutorial! !

The above is the detailed content of How to change nodejs version. 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