Home>Article>Web Front-end> Node version management tool--How to use nvm-windows (windows environment)

Node version management tool--How to use nvm-windows (windows environment)

青灯夜游
青灯夜游 forward
2021-06-29 10:35:15 4955browse

How to lower the version ofnode.js? This article will introduce to you the installation of Node version management tool-nvm-windows, and how to use nvm-windows to manage Node versions and switch versions.

Node version management tool--How to use nvm-windows (windows environment)

Due to business needs, I need to lower the node version, but I found a lot of tutorials on the Internet, but they cannot be used on Windows computers. I have no choice but to study it myself and successfully installed it on my own computer. Multiple versions of node are installed on your computer and can be switched with a few commands, so let’s get started.

[Recommended study: "nodejs Tutorial"]

First of all, nvm and n cannot be used on windows, and can only be used on mac or linux,This article specifically explains the use of nvm-windows on Windows. If you are a non-windows user, this article may not be of much significance to your current needs.

1. Download

There is a link to the installation package Lanzuo Cloud at the end of the article.

First go togithubto downloadnvm-windows.

https://github.com/coreybutler/nvm-windows/releases

Node version management tool--How to use nvm-windows (windows environment)

After decompression, double-click the installation package. After double-clicking,Here are the options The installation directory of nvm-windows.

Node version management tool--How to use nvm-windows (windows environment)

There is another directory next, which will be handed over tonvm-windowsto download different versions of nodes.

Node version management tool--How to use nvm-windows (windows environment)

Just click Next. Ifnodeis already installed on your computer, it will prompt you whether you need to hand over the version tonvm-windowsManage, click Yes~

1.1. Check whether nvm has been installed

cmd => nvmIf the following message appears, it means the installation is successful.

Node version management tool--How to use nvm-windows (windows environment)

2. Use nvm

npm listto list the versions that have been handed over to nvm management.

Node version management tool--How to use nvm-windows (windows environment)

nvm list availableYou can view all available versions.

Node version management tool--How to use nvm-windows (windows environment)

Next we start the installation.

nvm install Specify versionYou can directly enter the version number in the picture above

or

nvm install latest 安装最新的测试版 nvm install lts 安装最新的稳定版

If the installation fails halfway, it is yours The Internet is too slow. Find a better Internet cafe! Or make a mirror

3. Switch the version

After installation, you can switch the version

nvm use just specify the version

As shown in the figure below:
Node version management tool--How to use nvm-windows (windows environment)

4. Domestic download address Lanzuoyun

nvm-windows download address: Lanzuoyunnvm-windows

https://wws.lanzous.com/iji8qna8vqd

For more programming related knowledge, please visit:Programming Video! !

The above is the detailed content of Node version management tool--How to use nvm-windows (windows environment). For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete