NVM is a node version management tool. You can switch between the node version and the NPM version when using NVM. Before using NVM, delete the node that was downloaded from NVM.

During the installation process, the NVM installation directory cannot contain Chinese characters and Spaces. After you select the NVM installation directory, there will be another node directory. The Node installation directory cannot contain Chinese characters and Spaces.

If the installation directory contains Spaces or Chinese characters, the following command output is displayed: NVM exit status 1:(Garbled characters)

NVM exit status 145: NVM exit status 145:

Use git bash to select locale: zh_CN, Character set: GBK, and click options. The error message is displayed.

Common commands:

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 11.13.0Copy the code

3. Use a specific version

NVM use 11.13.0Copy the code

4, unloading

NVM uninstall 11.13.0Copy the code

Commonly used tips

  1. NVM Arch: Shows whether node is running 32-bit or 64-bit.
  2. NVM install [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 proxy. Displays the current proxy without the optional URL. Setting the URL to None removes the proxy.
  7. NVM node_mirror [url] : sets the node mirror. The default is nodejs.org/dist/. If you don’t write u…
  8. NVM npM_mirror [URL] : Sets the NPM mirror. Github.com/npm/cli/arc…
  9. NVM uninstall: Uninstalls a node of a specified version.
  10. NVM use [version] [arch] : uses the specified version of node. 32/64 bits can be specified.
  11. NVM root [path] : Sets the directory for storing different versions of Nodes. If no, the current directory is used by default.
  12. NVM Version: Displays the NVM version. Version can be simplified to v.