Reasons for installing multiple versions of node:
During the project development process, different projects use different versions of node, and sometimes errors are reported because the version of node is too high or too low; how to install multiple versions of node in the same system?
Manage with nvm
The address to install nvm: https://github.com/coreybutler/nvm-windows/releases
Download the installation package and install it like a fool
Common commands
- nvm list View all installed node versions on this machine
- nvm list available View all official versions of nodejs
- nvm install (version number) downloads the corresponding node version number
- nvm use version number to switch the node version of this machine
The actual operation can be seen in the figure below:
Note: Before installing nvm, please delete the previously installed node version, and execute the command as an administrator, otherwise it may cause node version switching to be invalid;