Managing Node.js by using nvm
nvm is the most popular and beginner-friendly way to manage multiple Node.js versions on your machine.
I use nvm to manage my Node.js versions, as it is a great tool, but nvm can be tricky to install so you will need to follow the installation instructions carefully. There is a troubleshooting guide with common issues and solutions at https://github.com/nvm-sh/nvm#installing-and-updating.
This is my preferred way to install nvm in macOS, as it is the easiest way to install it:
brew install nvm
For Linux and macOS, download and execute the installation script from the official repository:
curl -o- https: //raw. githubusercontent. com/ nvm- sh/ nvm/v0. 39.3/install. sh | bash
nvm doesn’t work in Windows, so if you are using Windows, you will need to use another version manager or Windows Subsystem for Linux (WSL).
Alternatives to nvm for Windows are as follows:
- nodist: https://github.com/nullivex/nodist
- nvm-windows:...