Skip to content

The Node.js Ecosystem

We have (very) briefly seen node.js, which is a JavaScript runtime environment.

We have (very) briefly seen NPM, which is both:

  • a company (npm, Inc. acquired by GitHub in 2020, itself acquired by Microsoft in 2018)
  • a website (npmjs.com)
  • a registry (the largest software package registry across all languages)
  • a command-line interface that allows interacting with the npm registry and managing packages in projects and other things

Managing Different Versions of node.js

Every 6 months, in April and October, a new major version of node.js is released. The October release is always an even version and will be in LTS (Long Term Support).

It is highly recommended to update your version of node.js often, at least with each LTS. To do this, rather than reinstalling the latest version on your machine and having only one version, you can use a node version manager. There are several (n and nvm are for POSIX OS only - that is, Linux and BSD, nvm-windows), and I recommend volta.

To install it:

shell
curl https://get.volta.sh | bash

Once installed, you need to open a new terminal, and then you have access to the volta command to install node.js:

shell
volta install node@lts

Volta will create a .volta folder in your home directory (/Users/<your-login>, for example /Users/stan) where it will put all the versions of node.js and npm that you have asked it to install.

Official Resources