nvm manages the node version; solves the problem that nvm displays the successful version of the switch, but the actual switch is not successful

Before uninstalling node, please check the current version of node -v, remember this version, remember! ! ! ! !
Uninstall node in the control panel; uninstall the installed NVM; if you haven’t installed NVM, just uninstall node.
Go to the environment variables to see if there is anything related to nvm and node. Delete all if you have it. It is the PATH
link in user variables and system variables : The nvm installation package built-in node6 and node14
contains the nvm installation package, node14 and node6 are built-in, and npm is also in it, which is 64-bit.
Insert picture description here
Open nvm-setup and install nvm first (you can also download it from Baidu resources)
Insert picture description here
. There are two installation paths during the installation process:
1. The nvm installation path
is not the nvm folder downloaded from my resources, then you can use this The downloaded nvm folder is deleted. Don’t forget to copy the settings.txt before deleting (the contents of settings are also below, just copy it if you don’t copy)
xxx is your own custom name, don’t just write XXX... .
Insert picture description here
2.node installation path
Insert picture description here

And then has been next to the end of finish.
Change settings.txt to
as many arch as the computer is

root: D:\XXX\nvm
path: D:\XXX\nodejs
arch: 64
proxy: none
node_mirror: https://npm.taobao.org/mirrors/node/
npm_mirror: https://npm.taobao.org/mirrors/npm/

After the installation is complete, open your cmd and enter nvm to check:

nvm
Insert picture description here
2. Enter nvm ls to check whether there is a node locally. If you uninstalled cleanly and did not download my resources, there should be no. If you use the configuration in my resources:
nvm ls
Insert picture description here
Insert picture description here
3. No matter whether you use or use resources If it is empty, or if you want to install another version of node, continue to enter:
nvm install 14.15.1 (please install the version I let you remember above, must be installed, not selected)
Insert picture description here
enter
nvm ls again to verify Next
Enter> nvm use 14.15.1 (which version you want to use) and
then verify whether the setting is successful
node -v
npm -v
Insert picture description here
switch at this time (change the version)
Insert picture description here


The above is over, in fact, the switchover failure is caused by the first installation of node. Don't be lazy, you still have to do it. I am just lazy, and I directly promoted to the most advanced node, but the project written in the previous low version can't run. So in the end it took more than ten minutes to get this done, just to bring new people, so I taught together.
I haven't written a blog for a long time. The main reason is that I don't want to write it. It can be reached by Baidu. It is rare to get a sentence or two. Let's talk about it. If you
have a front-end problem, you will reply to it.

Guess you like

Origin blog.csdn.net/OrangeChenZ/article/details/110622130