Managing Node.js versions
Node.js is a fast-moving project, so new versions are released every few months. To manage the Node.js versions on your machine, you will need to use a Node.js version manager.
There are several Node.js version managers available, but the most popular are as follows:
- Node Version Manager (nvm): https://github.com/nvm-sh/nvm
- n: https://github.com/tj/n
- Fast Node Manager (fnm): https://github.com/Schniz/fnm
- Volta: https://github.com/volta-cli/volta
In this book, we will use nvm as the Node.js version manager, but you can use any other version manager that you prefer.
Important info
In production environments, you should use the latest LTS version available, as this version is the most stable and is supported for a longer time. In most cases, there is no need to install a version manager on your production machine, as you will use a specific version.
Now that we are familiar with how the Node.js versions are organized, we...