Node Version Managers

Jul 13, 2020 • ☕️ 2 min read

Node.js major versions change every 6 months — odd-numbered releases (9, 11, etc.) become unsupported, and even-numbered releases (10, 12, etc.) move to Active LTS status and are ready for general use.

node.js release schedule

Each release has different set of features and bug fixes, normally LTS version is enough for general use and straightforward to install in all platforms (Linux, MacOS, Windows, etc) and you’ll find yourself upgrade after every 1 or 2 years.

There are situations where the ability to switch between different versions of Node.js can be very useful. For example, if you want to test a module you’re developing with the latest bleeding edge version without uninstalling the stable version of node, develop projects which require different minimum supported Node.js versions.

Node Version Manager is a tool that helps you manage and switch between diferrent Node.js versions with ease, written in any languages of choice (JavaScript, Go, Reason, etc.), and often avaialble as CLI in multiple types of shells and platforms.

Before choosing a node version manager, you’ll consider following features:

  • How easy it is to install and setup? or even uninstall.
  • Does it support your expected shells and platforms? You should pick the one that widely avaialbe and perform consistenly in multiple places.
  • Does it have enought features to manage versions (list, install, switch, alias, etc.)
  • Does it have simple and rememberable commands?
  • Does it support global npm packages seemlessly?

There are several version managers for node.js. Tools like nvm and n only run on Mac OSX and Linux. nvm-windows and nodist are designed for Windows

  • nvm: designed to be installed per-user, and invoked per-shell. nvm works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and windows WSL (Windows Subsystem for Linux).
  • nvm-windows: tl;dr nvm, but for Windows, with an installer
  • n: no subshells, no profile setup, no convoluted API, just simple
  • fnm: Fast and simple Node.js version manager, built in native ReasonML

This kind of tool is supposed to enables a concern-free installation and easy switching between different Node.js versions, saving time for what really matters. Better stay away from the one that fails to do so.

Related Articles

Tailwind CSS

A low-level utility-first CSS framework to write inline styles for rapidly building custom user interfaces

On temptation of Dark Mode

You don't know whether Dark Mode is overhyped or necessary but you know there is a real temptation of adding it to your sites

Become a Fullstack JavaScript Developer, Part 6: The Monorepo

Many companies are adopting monorepo but the decision to use it or not is quite tricky

An Overview of Monorepo

Monorepo is not new, Google and Facebook have been using it for years. So why now? I believe it depends a lot on the maturity of building systems