Installation of NVM
1. Download the installation package, https://github.com/coreybutler/nvm-windows/releases
2. After the download is complete, click on Nvm-setup, follow the steps to install, note that the path can not take spaces and Chinese path, where my installation is D:\DEV\NVM
3. After the installation is complete, configure the environment variables. When the latest version of the software is installed, variable names and variable values are automatically generated in the user variables of the environment variables.
4.NVM Common Commands
nvm-v // Check the version number of NVM NVM Install latest // Install the latest version of Nodejs NVM ls // NVM use 10.0.0// use 10.0.0 version of Nodejs
Open a CMD window input command: nvm v
, then we will see the version information of the current NVM. Then we can install the Nodejs.
Continue to enter the command: nvm install latest
if the network is unblocked, we will see the prompt that is being downloaded, and will let you use the latest node version when the download is complete.
If you are the first time to download, before use, the C:\dev
directory is not nodejs this folder, in the input such as: nvm use 5.11.0
after, you will find that the C:\dev
directory is more than a Nodejs folder, this folder is not a simple folder, it is a shortcut, pointing to the C:\dev\nvm
in the v5.11.0 folder.
In the same way, we can download other versions of Nodejs, so that we can nvm use 版本号
nvm use 5.11.0
easily implement version switching by command: for example:
Note: If your computer system is 32-bit, then when downloading the Nodejs version, be sure to indicate 32 such as: nvm install 5.11.0 32
in the 32-bit computer system, can be used, the default is 64-bit.
Installation of NPM
Nodejs installation configuration under Windows (using NVM)