Fast Node Manager (fnm)
07. Apr. 2025
You can manage different versions of Node.js
locally with the Node Version Manager (nvm
). However, the Fast Node Manager (fnm
) offers some advantages:
- Cross-platform support (i.e. for macOS, Windows, Linux)
- Easy installation
- Fast execution speed
- Works with
.node-version
and.nvmrc
files
For installation details, see the Github Repo. Below I summarize the steps needed to install fnm
for macOS.
Installation
Installation using Homebrew is the easiest. You only need to install one package:
brew install fnm
After that, the following line of code must be added to the .zprofile
file (or .zshrs
file):
eval "$(fnm env --use-on-cd --shell zsh)"
Now the terminal environment has to be restarted and fnm
is ready to use!
Usage
The following are probably the most important or most frequently used commands:
fnm list-remote
: Returns a list of all available versions of Node.jsfnm list
: Returns a list of all installed versions of Node.jsfnm install xxx
: Installs the version of Node.js specified by xxxfnm use xxx
: Changes the used version of Node.jsfnm env
: Outputs the required environment variables forfnm
fnm default xxx
: Setsxxx
as the default versionfnm current
: Outputs the current versionfnm uninstall xxx
: Deletes the version of Node.js specified byxxx