What uses / respects the .node-version file?

(disclosure: I maintain http://nvm.sh)

The most-used version managers for node are without a doubt nvm, nave, and n.

nvm is for modifying individual shell sessions to use the version you want. nave is for launching subshells with the version you want loaded. n is for switching a single system-wide version of node.

nvm uses a .nvmrc file, which like .ruby-version, contains the version-ish string X you'd normally couple with nvm use X or nvm install X. nvm use or nvm install by itself will locate the .nvmrc file, as will simply sourcing nvm upon opening a new shell.

It appears nave supports a .naverc file, but I'm not too familiar with its usage.

n doesn't appear to support any such config, but as it's system-wide, it doesn't really make as much sense to do so.


avn supports .node-version and attempts to provide automatic version switching by hooking into cd, after nvm decided that was too invasive a behavior to include.


There are at least two version managers for node.js, respecting .node-version file:

  • avn - Automatic Node Version Switching
  • nodenv - Yet another version managers
  • asdf - Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more, provided you configure it accordingly

There may be some other version managers, but I'm not aware of them.

I don't know which particular version manager Atom uses. nodenv have more stars on github, but avn looks more mature and better maintained for me, not to mention its compatibility with both n and nvm.


.node-version is a file read by various tools on an individual basis for specifying the target node version. Version managers which use/respect it include (in alphabetical order):

  • asdf-nodejs Node.js plugin for asdf version manager. (macOS, Linux)
  • avn Automatic Version Switching for Node. (macOS, Linux)
  • direnv unclutter your .profile. (macOS, Linux)
  • fnm 🚀 Fast and simple Node.js version manager, built in Rust. (macOS, Linux, Windows)
  • n Interactively Manage Your Node.js Versions. (macOS, Linux)
  • nodenv Manage multiple NodeJS versions. (macOS, Linux)
  • nodist Natural node.js and npm version manager for windows. (Windows)
  • nvm.fish Node.js version manager lovingly made for Fish. (macOS, Linux)
  • nvs Node Version Switcher - A cross-platform tool for switching between versions and forks of Node.js. (macOS, Linux, Windows)

Other products which test for .node-version include:

  • Cloudflare Pages Build fast sites. In record time.
  • Hostman Hosting platform that deploys your web applications
  • netlify Instantly build and deploy your sites to our global network from Git.
  • paketo Your app, in your favorite language, ready to run in the cloud
  • render A Cloud for the New Decade
  • starship ☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!

I documented usage and some supported features here: https://github.com/shadowspawn/node-version-usage


Direnv supports both .node-version and .nvmrc files. Direnv is all I use for loading project-specific versions of Node.js.

https://github.com/direnv/direnv/wiki/node#load-nodejs-version-from-a-node-version-or-nvmrc-file


asdf with asdf-nodejs supports .node-version with

legacy_version_file = yes

added to ~/.asdfrc