Use multiple node versions on a machine
Node Version Manager (NVM)
TL;DR - Remove existing node installations, install nvm, install node versions under nvm
nvm install <version>, use the versionnvm use <version>
If you have already installed nodejs, lets start by removing it first
Make a note of the existing version of node and npm
node --version npm --version
Clear cache
npm cache clean --force
Uninstall nodejs from you machine
Delete all files from the below folders
C:\Program Files (x86)\NodejsC:\Program Files\NodejsC:\Users\{User}\AppData\Roaming\npm(or%appdata%\npm)C:\Users\{User}\AppData\Roaming\npm-cache(or%appdata%\npm-cache)C:\Users\{User}\.npmrc(and possibly check for that without the.prefix too)C:\Users\{User}\AppData\Local\Temp\npm-*
Download and install the nvm-setup file for the most recent release
After install take a new terminal and check for the installation using the command
where nvmTo list the installed node versions
nvm lsTo list the available node versions to install
nvm list availableTo install required versions, use
nvm install <version>
All set!, now to use a specific version of node, use the command nvm use <version>

