Node version control tools — NVM, Window

1. NVM is introduced

Node.js version Management NVM is a node.js version management tool. It allows you to install and switch between different versions of NodeJS.

2. Install

1. Download github and search for nVM_Windows, or click this link to download the latest version. Open the url and we can see that there are two versions:

  • Nvm-noinstall. zip: green installation-free version, which requires configuration.
  • Nvm-setup. zip: installation version, recommended

2. Use nVM-setup. zip to install

  • Double-click the start

  • Selecting an Installation Path

  • Select the nodeJS link path (you can understand creating a shortcut, select the path where the shortcut is stored)

    Select the folder in which Setup should create the symlink then click Next

    This directory will automatically be added to your system path

    After installing Node, use to create the node installation file link to the path entered below, and then add this path (file link) to the system environment variable

  • Confirm the installation

3. The installation is successful

If that doesn’t work, restart the computer

At this point in the folder

Install/manage nodeJS

1. View all versions installed locally. The optional parameter available displays all downloadable versions.

nvm list [available]
Copy the code

2. You can customize the version number in the command. For details, see command 1

NVM install 14.17.2Copy the code

3. Use a specific version

NVM use 14.17.2Copy the code

NVM use 16.7.0Copy the code

4, unloading

NVM uninstall 14.17.2Copy the code

5. Command prompt

Taobao source:

  • Node_mirror: npm.taobao.org/mirrors/nod…
  • Npm_mirror: npm.taobao.org/mirrors/npm…
  1. nvm arch: Shows whether node runs on 32-bit or 64-bit.
  2. nvm install <version> [arch]: Installs Node. Version can be a specific version or latest stable version. The optional arch parameter specifies whether to install the 32-bit or 64-bit version, which defaults to system bits. You can add –insecure to bypass SSL on the remote server.
  3. nvm list [available]: Displays the installed list. The optional parameter available displays all versions that can be installed. List can be simplified to ls.
  4. nvm on: Enables node.js version management.
  5. nvm off: Disables node.js version management.
  6. nvm proxy [url]: Sets the download agent. Displays the current proxy without the optional URL. Setting the URL to None removes the proxy.
  7. nvm node_mirror [url]: Sets the node mirroring. The default isnodejs.org/dist/. You can view the Settings in installation directory settings. TXT or perform operations in this file.
  8. nvm npm_mirror [url]: Sets the NPM mirror. The default isGithub.com/npm/cli/arc…. You can view the Settings in installation directory settings. TXT or perform operations in this file.
  9. nvm uninstall <version>: Uninstalls the specified version of Node.
  10. nvm use [version] [arch]: Use the specified version of Node. 32/64 bits can be specified.
  11. nvm root [path]: Sets the directory to store different versions of Node. If no, the current directory is used by default. !!!!!!!!! Note: Do not change casually, the change may lead to command execution error
  12. nvm version: Displays the NVM version. Version can be simplified to v.