download:
1. Download nvm address:
https://github.com/coreybutler/nvm-windows/releases
Download the installation package, and it can be used without configuration after downloading, which is very convenient.
A brief description of some packages:
nvm
-
noinstall.zip
: This is a green free installation version, but it needs to be configured before use
nvm
-
setup.zip
: This is an installation package, click to install after downloading, it can be used without configuration, which is convenient.
Source code(zip)
:
zip
compressed source code
Sourc code(tar.gz)
: The source code of
tar.gz
, generally used in
*nix
systems
Install:
1. Installation directory:
The default installation directory is not used here, modify the installation directory to F
:\nvm\
; you can decide the installation directory by yourself.
2. Installation directory:
Adding
the installation directory of
node.js The statement of
adding the installation directory of node.js here is actually not accurate. The accurate statement should be to configure the installation directory of node.js ; by default , C:\Program Files\nodejs directory C:\ The ProgramFiles\nodejs directory is also the default installation directory for node.js;
If the reader
has installed
node.js before installing nvm
, and modify the installation directory of node.js, then the directory here should be modified to the installation directory of
node.js
; if the reader
has not installed
node.js before installing nvm
, Then the directory here can be defined by yourself.
3. Click Install:
During the installation process, it will pop up: Since node
has already been installed
, it will prompt "Do you want
nvm
to manage the installed
node
version?
"
, click Yes to test whether the installation is successful after the installation is complete
verify:
Enter the command: nvm -V
Command use:
nvm for windows
is a
command-line tool
, enter
nvm in the console
,
you can see its commands with
Law. Commonly used commands are:
Order | illustrate |
nvm list available | Show all versions of node.js that can be installed |
nvm list |
Show all installed node.js versions |
nvm use | Switch to the specified node.js version |
nvm install | Install the specified version of node.js, for example: nvm install 8.12.0 |
nvm uninstall | Uninstall the specified version of node.js, for example: nvm uninstall 8.12.0 |
nvm he | Enable node.js version management |
nvm off | Disable node.js version management (doesn't uninstall anything) |
Note: When using nvm-window, the configuration of environment variables, especially whether the Path is correct