What is the NVM
๐ NVM is a node versioning tool that allows you to install multiple Node versions (and matching NPM versions) in the same environment and switch between them at any time.
Ordinary computers can only install one version of Node ๐, but in work, we may use different versions of Node in face of different projects, which caused a lot of trouble to programmers ๐จ๐ป. At this time, NVM came into being ๐ฝ
Download and install
To download NVM, go to Github
Select nvM-setup. zip to download the zip package. You need to decompress it and double-click to install it
Github was slow to download, but here I put it on the Blue Cloud, where you can download the EXE file directly
The NVM run file
The installation
Double-click to install; The installation will let you choose the path, I usually install this tool by default, all the way to the next step
It’s probably going to pop up again and again when you install it
This is because I already have Node installed, so just click ‘yes’
๐คก Check whether the installation is successful
Go to CMD and type in
nvm -v
Copy the code
If a large number is displayed and the version number is available, the installation is successful
Using the command
Displays the versions available for download
nvm list available
Copy the code
Download different versions of Node
NVM Install Version/ / such as
nvm install 11.13. 0
Copy the code
Uninstall the node version
NVM Uninstall Version numberCopy the code
You can also view the versions that have been installed, as well as the version number in use
nvm ls
Copy the code
Where the asterisk is is the version in use
๐คก Switching version NVM Use version
nvm use 14.7. 0
Copy the code
Problems in use
๐ซ Cannot change the version number & NPM cannot be used. This is because the node has been installed before the NVM installation, so the original node is uninstalled and deleted, and then the NVM is reinstalled. Install node in NVM
Uninstall node — > Reinstall NVM. Exe — > Download Node from NVM — > Switch to Node