When installing vue3, the project couldn't run. I asked Du Niang and said it was because the node version was too low. Because I have been using this node version and many projects on the machine rely on this version. If I change the version rashly, I would be afraid of problems, so I wanted to install multiple versions. version of node, just switch to which version you need.
1. nvm documentation manual - nvm is a nodejs version management tool. Download nvm for windows. Download and decompress.
2. Start the installation and run the nvm-setup.exe file, continue next and finally finish.
3.cmd to check whether nvm is installed successfully
3. Install the specified version nvm install 14.18.2. I have installed two versions, which can be viewed through the nvm list command.
If you find that npm does not exist or you find that npm reports an error when running a local project, you need to check whether there are problems with the files in these two folders. I started to install version 14.17.2. After the installation was completed, I switched to this version and npm could not be found. Later, I found that node_modules in the folder corresponding to this version was empty. I checked the historical version of node and could not find the corresponding version. I decisively deleted this version and re-downloaded the adjacent version to solve the problem of npm error.
CNPM Binaries Mirror can view the historical version of nodejs,