preface
Most of today’s web front-end development is inseparable from Node, and Node updates iteration quickly; Different projects depend on different Node versions. Therefore, the node version must be installed to ensure proper operation. Maintaining multiple versions of Node at the same time can be a very troublesome thing, at this point we need a version control tool that can install multiple versions of node and can switch at any time to simplify our work, the commonly used node version management tools are N, NVM, NVS, here I mainly introduce NVM.
NVM is introduced
NVM is a nodeJS versioning tool. It lets you install and switch different versions of NodeJS. Download, install, and use are listed below.
download
Click NVM Download to download the latest version. My operating system is Window. There are two versions of Windows that are suitable for installation:
-
NVM -noinstall.zip Green The version requires no installation, and environment variables need to be configured
-
NVM -setup.zip Installation version, available after installation
The installation
I’ve chosen the nvM-setup.zip version here.
- Click the installation file nvM-setup.exe
- Select the default NVM installation path. You can change the installation path yourself.
- Select the nodejs installation path. It is the default installation path. You can change the installation path yourself.
- After the installation is complete, open CMD and enter NVM -v. If the installation is successful, the following information is displayed
use
Here are some of the most common usage commands
NVM list Lists all versions installed on the local PC. NVM list Available Adds an optional parameter. Available Lists all downloaded versions. NVM install 10.22.0 Installs node.js Version Specifies the version. NVM install stable Installs the latest stable version of Node. js. NVM uninstall 10.22.0 Indicates the command to uninstall Node. js Switch to the specified node.js version and use this version nodejs NVM on to enable node.js versioning NVM off to disable Node.js versioningCopy the code