Why do you need multiple versions of Node.js on your PC and how to Install them?
Node Manager tools
You just found a "cool" open-source project on GitHub. You decided to contribute to it. You just forked the repo and cloned it in your system.
And when you're trying to build it you're getting all sorts of colorful errors, exclaiming that the node version used in the project and the node version in your local system are incompatible.
Now what? Are you going to uninstall the node in your local system and then reinstall the version used in that project?π€‘
Hell Nooo!!! Doesn't it sound stupid to you?
There are tools available out there that are going to let you install various versions of Node and let you switch between them in seconds!
Here are all of the tools, methods to install them, and all the possible errors that you might face while installing them:
Note: You just need to install one of them!
1. NVM
Full form: Node Version Manager (very obvious)
Method 1 (Simplest for windows users)
Go to this repo and then click on Download Now
and then run the executable file that you've just downloaded. That's it.
Method 2 (Best for Unix based systems)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
OR
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
Check whether everything is installed or not by nvm --version
command on PowerShell and if everything is been installed then this will return the version of nvm otherwise error.
If you're getting any errors then maybe running this command on PowerShell with administrator rights will solve it
2. VOLTA
Method 1 (For windows)
Method2(For Unix based system)
curl https://get.volta.sh | bash
If it did help so, please check my YouTube channel as well I put some awesome content for developers there.
ByeππΌππΌββοΈ