Install NVM (Node Version Manager)
Whats is NVM ?
Do you ever find yourself needing to work with different versions of Node.js for different projects on the same computer? If so, you might want to check out a tool called NVM, which stands for Node Version Manager. With NVM, you can switch between different Node.js versions depending on what you need for your project.
How to install NVM on Linux and Mac OS
To install or update nvm, you should run the install script. To do that, you may either download and run the script manually, or use the following cURL or Wget command:
CURL
|
|
WGET
|
|
To check that NVM has been installed correctly, run the following command:
nvm –version
If NVM has been installed correctly, you should see the version number displayed in your terminal.
Usage
For first time we can try to search the node version first, in this case we can type on our terminal:
|
|
Or we can just type for the LTS version for much stable version
|
|
After that we can install the node version, for installing the node version we can type:
|
|
Or we can type the release name, for this case on version 16.19.0 the release name are (Gallium)
|
|
After the installation finish, try type :
|
|
To see the verion of installed nvm on your system
Setting for default node version
If you want to use the default version of node on your own, you can set the node by typing:
|
|
source: https://github.com/nvm-sh/nvm
How to install NVM for Windows
As we know NVM are only on Linux and Mac OS, but after i done some search on internet i found another project like NVM but for windows
NVM For Windows : https://github.com/coreybutler/nvm-windows
To install it we can just download the binarry file (.EXE) from the release section in github Release : https://github.com/coreybutler/nvm-windows/releases/tag/1.1.10
As i know the NVM for windows version is still the same as the Linux version, you can read more about them in official github repo above