Before share a node JS tool you should consider these things:
- Your tool has no bugs
- Your tool has documentation
- Your tool has compatibility between versions
Compatibility is something important to keep in mind. Developers needs different versions according to their needs, so your tool must have support for different versions.
The problem is that you need to install different versions for test it, and download and use the node installer for each version takes his time.
Afortunately there are a lot of tools for manage versions quickly. Today I'm going to talk about N, a simple node version manager.
N is a really simple Node version manager. It helps you to change between versions with a command.
N supports Linux and MacOS, but not Windows, unless you use WSL.
Ok, you know what is N and why you need it. Now let's go to install it and learn some commands.
Install N globally with your favorite package manager.
Install a version with
If you installed many versions (e.g. 16.5.0 and 14.18.2) you can view a list of cached versions and select which to install.
You should see something like this
Use the arrow keys to change versions, and press enter for install.
If you want to clear some specifics versions or all the cache, you can use the
prune commands, respectively.
Yes, it works without problems. You can do
node --version and check it.
Are you going to use N? You prefer other version manager? Tell me in the comments whatever you want 😄