What is nvm? 😯
nvm is a great tool to Install `Node.js` and manage its versions. `nvm` supports POSIX-compliant shell (sh, dash, ksh, zsh, bash). In other words, you can use this tool on MacOS, Linux (Ubuntu, Debian, Arch etc) and Windows WSL (Window Subsystem for Linux).
Why nvm instead of traditional way?
1- Makes it easy to install any version of node. You can switch between different versions anytime.
2- `nvm` sets the right permission while installing Node. So you won't need root permission (sudo) while installing global packages.
1-Installing nvm: ( 👉 Please check latest command from Here 🔗)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
or use wget.
Points to remember:
1- You can install through wget as well. Head to the link to see that.
2- Close the current shell/terminal after installing.
3- You might get an error if nvm doesn't find .bashrc/.zshrc. Create one before re-running above command.
2- Installing node (Link)
nvm install node
Note: If you want to install any specific version then you check its command here.