[Environment Construction] Install nvm
nvm
- nvm is a node version management tool
- Use nvm to download the corresponding node version (multiple versions are possible)
- Use nvm to freely switch node versions
- Note: The content between multiple node environments managed by nvm is not shared with each other, and each environment is independent
Download nvm (windows system)
-
Click the download link above to enter the nvm version download page of github
-
Choose any one of the red boxes above to download
install nvm
-
Double-click (unzip) to open
nvm-setup.exe
the file
-
Choose
next
to enter the nvm installation directory
-
After setting the directory where nvm is installed on the computer, click
next
to enter the interface of setting the node installation directory (the installation directory is generally not recommended to be installed on the C drive)
-
After setting the node installation directory, click to
next
enter the confirmation installation interface
-
Click Install to confirm the installation. After the installation is complete,
cmd
enter nvm to confirm the installation is successful
Common commands
nvm list
ornvm ls
: display a list of installed node versionsnvm list installed
: Display a list of installed node versionsnvm list available
: Displays a list of node versions that can be downloaded (displays some versions)nvm install 16.16.0
:16.16.0
The downloaded node versionnvm install latest
: Install the latest version of nodenvm use 16.16.0
: use16.16.0
the version of node (provided that this version has been downloaded)nvm uninstall 16.16.0
: Uninstall the 16.16.0 version of nodenvm v
: View nvm version
Note:
nvm install <版本号>
When , there may be a problem of insufficient identity authority. At this time, you cancmd
run this command as an administrator