Managing multiple Node.js versions on Windows has historically been a challenging task. While solutions like NVM for Windows have been popular, they often face limitations such as needing local admin rights, and the tool switching the node version globally when what you really want is to have it change the node version for a particular terminal window. Fast Node Manager (fnm) emerges as a worthy alternative, offering fast performance, cross-platform compatibility, and it addresses the other issues mentioned above, regarding NVM.
You can checkout their GitHub project for more info: Schniz/fnm: 🚀 Fast and simple Node.js version manager, built in Rust
Why Use fnm?
Here are a few compelling reasons to adopt fnm:
🚀 Fast and Lightweight
- Written in Rust for performance.
- Significantly faster than nvm when switching Node.js versions.
🧰 Seamless Version Management
- Install any Node.js version in seconds.
- Automatically uses the correct version based on a .node-version or .nvmrc file in your project.
🌍 Cross-Platform
- Works on macOS, Linux, and Windows (via WSL, PowerShell, or Git Bash).
📦 Environment Isolation
- Helps ensure consistent Node.js environments across projects and teams.
Installing fnm
macOS or Linux
curl -fsSL https://fnm.vercel.app/install | bash
Windows
If you have “NVM for Windows (by Corey Butler) installed, it may cause conflicts. If you wanted to uninstall that, you can run
winget uninstall CoreyButler.NVMforWindows
If the above step uninstalls system-wide node itself, you can reinstall it using winget.
winget install OpenJS.NodeJS
Install Fast Node Manager (fnm)
winget install Schniz.fnm
Common Commands
Here are some commonly used fnm commands:
# Listing all remote versions fnm ls-remote # Listing all installed ones fnm ls # Installing fnm install <version> # Uninstalling fnm uninstall <version> # Installing node of the latest LTS version fnm install --lts # Setting an alias fnm alias <version> <name> # Shortcut for setting 'default' as an alias fnm default <version> # Removing an alias fnm unalias <name> # Using a Node of a particular version fnm use <version> # Displaying the version of currently used Node fnm current
Optionally, you can update your PowerShell profile (assuming you’re using PowerShell) to have fnm automatically switch to a particular version (as specified by an .nvmrc
file or a .node-version
file) when cd
ing into a particular directory. This helps you by not having to think about running fnm use...
when juggling between different projects.
To do so, open (or create) your PowerShell profile file:
notepad || code $profile
Add the following:
fnm env --use-on-cd | Out-String | Invoke-Expression
Save, close, reopen your shell for your changes to take effect. When fnm encounters a directory that has an .nvmrc
file, or a .node-version
file, or a package.json
that has an engines
section that specifies a node version, it will try to switch to that version automatically. If that particular version is not already installed, you’ll get a prompt asking whether you want to install it.
Final Thoughts
If you’ve ever been frustrated by slow Node.js version switching or if you’re working across multiple Node.js projects, fnm is worth a look. It offers an efficient, modern alternative to older tools and fits neatly into the workflow of today’s JavaScript and TypeScript developers.