NVM installation and use

Node.js Version Management NVM is a node.js version management tool. It allows you to install and switch between different versions of NodeJS. Download, install and use instructions are listed below.

1, download

You can download the latest version of Windows on Github

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

2, installation,

Foolproof all the way to the next installation

3. Confirm whether the installation is successful

Open CMD, enter the command NVM, if the installation is successful, you can see the NVM version prompt

Install/manage nodeJS

  • Common commands

    • View all versions installed locally; The optional parameter available displays all downloadable versions.
    nvm list [available]
    Copy the code
    • Install. The version number in the command can be customized. For details, see the list obtained in command 1
    nvm install 11.13. 0
    Copy the code
    • Switch node versions using /
    nvm use 11.13. 0
    Copy the code
    • uninstall
    nvm uninstall 11.13. 0
    Copy the code

Problems encountered

1. If the Node version is slow to download, it may be stuck or the download may fail. You can change the image source of Taobao

  • Use Taobao source only for current downloads
npm install --registry=https://registry.npm.taobao.org packageName
Copy the code
  • Global Settings use Taobao source, after using NPM has always been Taobao source
npm config set registry https://registry.npm.taobao.org
Copy the code