First things first: NVM does not support Windows!! , but there are alternatives, namely NVM-Windows,

Download and install

Click download NVM let’s select the first of latest: nvM-noinstall.zip and click Download.

  • Note: In Windows, you need to set the extension of the display file type, so that you can see the suffix of the above file
  • Double-click install. CMD and it will ask you to type “An absolute directory to which the compressed file was extracted or copied”. Ignore it and press Enter. Then we modify it to look like this:
root:  E:\soft\nvm
path:  E:\soft\nvm\nodejs
arch: 64 
proxy: none
node_mirror: http://npm.taobao.org/mirrors/node/
npm_mirror: https://npm.taobao.org/mirrors/npm/
Copy the code

Configuring environment Variables

  • Go to My Computer -> Properties -> Advanced System Settings -> Environment Variables
  • Add the NVM_HOME and NVM_SYMLINK variables to the system variables and set the values to

NVM_HOME E:\soft\nvm
NVM_SYMLINK E:\soft\nvm\nodejs
Copy the code
  • Used in the path variable
Create %NVM_HOME% %NVM_SYMLINK%Copy the code

NVM use

  • Open a CMD window and enter the command: NVM v, and we will see the current VERSION of NVM. Then we can install NodeJS.

  • Continue typing the command: NVM install latest If the network is up to speed, you will be prompted to download and use the latest version of Node.

  • If you are downloading for the first time, there is no nodejs folder in the E:\soft\ NVM directory before use. After NVM use 8.11.2, you will notice that the E:\soft\ NVM directory has a nodejs folder. This folder is not a folder, but a shortcut to the v8.11.2 folder in E:\soft\ NVM.

  • Also, you can download other versions of NodeJS, so that you can easily switch the version by using the command: NVM use version number for example: NVM use v10.15.3.

  • NVM list Displays the node list before a single node

  • Note: if you are running a 32-bit computer, you must specify 32 when downloading the NodeJS version, such as NVM install v10.15.3 32, so that it can be used on a 32-bit computer, the default is 64-bit.

NRM installation is used

What is NRM? NRM is the NPM Registry Manager, which is also the NPM mirror source management tool. Sometimes foreign resources are too slow, so we can use this to switch the mirror source. NPM install -g NRM Note that -g can be placed directly after install, and we’d better use it in the future, because it makes it easier to change and use the latest command up and down in CMD. When the installation is complete, we can use it.

  • The NRM ls command is used to display all switchable mirror addresses
  • Command: NRM use CNPM so that we can directly switch to CNPM. Of course, you can also switch by following the other things listed above