Node.js + fnm

Fast Node Manager -- seamlessly switch between Node.js versions

Quick summary

fnm (Fast Node Manager) installs and manages multiple Node.js versions. It is written in Rust and is significantly faster than nvm. The bootstrapper installs the latest LTS version of Node.js and sets it as the default.

Common tasks

Basic Usage

node --version

Basic Usage

npm --version

Basic Usage

fnm install 22

Basic Usage

fnm install 20

What is it?

fnm (Fast Node Manager) installs and manages multiple Node.js versions. It is written in Rust and is significantly faster than nvm. The bootstrapper installs the latest LTS version of Node.js and sets it as the default.

Basic Usage

Check current version:

$node --version
$npm --version

Install a specific Node version:

$fnm install 22
$fnm install 20

Switch between versions:

$fnm use 22
$fnm use 20

Set a default version:

$fnm default 22

List installed versions:

$fnm list

Install npm packages globally:

$npm install -g typescript
$npm install -g yarn

How it works

fnm adds a shim directory to your PATH and switches Node.js versions by updating symlinks. The shell integration (fnm env) ensures the right version is active in every new terminal. When you cd into a project with a .nvmrc file, fnm automatically reads the version and switches to it.

Tips

Node.js is managed by fnm -- never install it via apt or brew directly. Only fnm should manage Node versions.
Use fnm install --lts to always get the latest LTS release.