nvm installation and use, switching control over node.js version


Preface

Some dependent modules of the scaffolding project have compatibility issues with the node version. If you develop both new and old projects, you often need to switch the corresponding node version so that the project can run normally. It would be very troublesome if you uninstall the node version and reinstall it every time. Trouble, luckily there is nvm tool, which can help us quickly switch node versions.


1. What is nvm?

The full name of nvm is node.js version management. It is a nodejs version management tool through which you can install and switch different versions of nodejs.

2. Installation

Download address: nvm

Pull down to find:
Insert image description here
Select exe to download and install

勾选I accept the agreement,Next
agree

选择安装路径(尽量选择非中文路径),Next
Insert image description here
Install
Insert image description here

3. nvm command description

nvm ls // View the installed version
nvm install // Install the specified node.js version
nvm use // Use the specified node.js version
nvm list available // View the latest node.js version list that can be downloaded and installed
nvm uninstall / /Delete the installed specified version
nvm alias //Add aliases to different version numbers
nvm unalias //Delete the defined alias
nvm current //View the currently used version

window+R, enter cmd to open the cmd window

nvm ls (view installed version)

Insert image description here

nvm list available (View the latest version list that can be downloaded and installed)

Insert image description here

nvm current (view the currently used version)

Insert image description here

nvm install (download and install the specified version)

Insert image description here

nvm use (use the specified version)

Insert image description here

Guess you like

Origin blog.csdn.net/sd1sd2/article/details/131769095
Recommended