1. Download
https://github.com/coreybutler/nvm-windows/releases
Recommended download nvm-setup.zip
for easier operation in the future
2. Installation
1. Double-click the decompressed filenvm-setup.zip
2. Select nvm
the installation path,Note that you must choose a path that is all in English, without Chinese characters and spaces., otherwise an error will be reported if used later.
3. Select node.js
the installation path
4. Confirm installation
5. If a version has been installed before node
, a pop-up will pop up to control node
whether to join a version that already exists nvm
. Just select "Yes" at this time; if it has not been installed before node
, ignore this
6. Installation successful
3. Use
1. Use nvm list
to view the installed node
version
nvm list //显示已安装的node版本,同nvm list installed
nvm list available //显示所有可以下载的node版本
2. Use to nvm install
install the specified node
version
Note that if you install it directly using nvm install, it will be very, very slow. It is recommended to switch the installation source of nvm to Taobao source, which will make the installation much faster.
- Command line input where nvm
- Find settings.txt in the prompt directory
- Add Taobao image later:
node_mirror: https://npm.taobao.org/mirrors/node/
npm_mirror: https://npm.taobao.org/mirrors/npm/
As shown in the picture:
3. Use nvm use
to specify the current node
version
First use nvm list
to view the current node version, we can see that there are currently three versions
Use nvm use 14.20.1
to switch to this versionNote: The following error will be reported at this time. This is because cmd is not run as an administrator. Just run it as an administrator again.
exit status 5: �ܾ����ʡ�
exit status 1: ���ļ��Ѵ���ʱ�����������ļ���
Run as administrator cmd
, switch node
version successfully
Finished~~~~Spread flowers
This article refers to https://www.jianshu.com/p/13c0b3ca7c71