download
Releases Releases · CoreyButler/NVM-Windows · GitHub
If github is inaccessible, download it from a web disk
Link: https://pan.baidu.com/s/1t9UcMBNmFcxatcZvDl0zMA extraction code: 60 wfCopy the code
The installation
Uninstall Node from your computer before installing it
- Windows Settings –> Apply –> Find Node–> Uninstall
- Restart the computer (or kill all Node related processes from task Manager)
- Find the following folders and delete them. Depending on the version you have installed, these files may or may not exist:
- C:\Program Files (x86)\Nodejs
- C:\Program Files\Nodejs
- C:\Users{User}\AppData\ folder \ NPM (or % AppData %\ NPM)
- C:\Users{User}\AppData\Roaming\npm-cache (or % AppData % npm-cache)
- Check the %PATH% environment variable to make sure there are no references to Nodejs and NPM
- restart
Install using the installation package
Configure environment variables: NVM_HOME, NVM_SYMLINK
Check whether the installation is successful: nVM-v
Locate the configuration files and change the node and NPM installation sources to speed up node and NPM installation
C:\Users\sd401\AppData\Roaming\nvm\settings.txt
Add the bottom source address at the end
node_mirror: https://npm.taobao.org/mirrors/node/
npm_mirror: https://npm.taobao.org/mirrors/npm/
Copy the code
NVM command
nvm ls available
Gets the available Node versionnvm list
Lists the installed versions of Node, which can be abbreviated asnvm ls
Command.nvm on
Enable node version management.nvm off
Disabling the Node version does not uninstall anything.nvm uninstall <version>
Uninstall the specified version of Node.nvm install <version>
Install the specified version of Node.nvm use <version>
Use the specified version of Node.
Possible problems in use
- After switching node versions, the global installation package is gone
Before installing the global package, change the default address of the global package
npm config set prefix "F:\nodejs\node global"
npm config set cache "F:\nodejs\node cache"
Copy the code
Then set the address of the global package into the path variable
Finally, you can install global packages. After installing the full packages, they will not be lost even if you switch node versions