NVM: You can switch between node versions on your computer at any time.

The installation

Download the nVM-setup. zip installation package on Github. Download from github.com/coreybutler… Installation package description: nVM-noinstall. zip: green installation-free version, but need to be configured. Nvm-setup. zip: installation version. You are advised to download and install nVM-setup. zip

Matters needing attention:

Do not have Spaces in the installation path

Normal Installation process

1. Before installing NVM, delete all nodes from your computer. Find the node installation directory and delete the node folder, or search for node

2. Install NVM. Download nVM-setup. zip and create an NVM folder on drive C. (We will install it directly on disk C or D, which will automatically add the path of NVM to the system path, and also avoid some pits with insufficient permissions.)

3. Then run CMD as administrator and type NVM

4. NVM install 16.11.1 after successful download NVM use 16.11.1 ok

use

NVM install <version>: download the corresponding version of node NVM list: list existing node versions NVM use <version>: NVM on: enables node.js version management. NVM off: disables node.js version management. NVM node_mirror [URL] : enables node mirroring. If you don't write the url, then use the default url, after setting to the installation directory settins. TXT in view, the domestic mirror address https://npm.taobao.org/mirrors/node/ NVM npm_mirror [url] : Set the NPM mirror address, the default is https://github.com/npm/cli/archive/, domestic mirror address: https://npm.taobao.org/mirrors/npm/ NVM uninstall < version > : Uninstall the specified version node NVM use [version] Use the specified version node NVM versoin: displays the NVM versionCopy the code

Q&A

1. The NODE installation succeeds, but the NPM download fails

Add two lines of image address in settings. TXT under NVM installation path:

Node_mirror: npm.taobao.org/mirrors/nod… Npm_mirror: npm.taobao.org/mirrors/npm…

2. Exit status 1: XXXX is reported by the NVM use [version] command

Cause: There is a space in the installation directory. Solution: Uninstall and reinstall the NVM. Ensure that no space exists in the NVM installation path

3. NVM use Successfully switches nodes, but runs the node -v command instead of the internal name

Cause: The node installation directory in the NVM is incorrectly configured in environment variables. Solution: Create an empty nodejs folder in the NVM installation directory. D:\ NVM \nodejs in the environment variable, change the %NVM_SYMLINK% pointing to the address above, open CMD again, NVM use uses a specific version of Node to test whether node -v is feasible to configure environment variables (window+r – > sysdm.cpl – > Advanced – > Environment variables).

4. Exit status 145: XXXX is reported by NVM use [version]

To solve

Remove the original Node and NVM and follow the installation process again