.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)
  • chnode Changes shell's current Node.js version by updating $PATH (macOS, Linux)
  • dev dev is built on pkgx, a single, standalone binary that can run anything (macOS, Linux)
  • direnv unclutter your .profile. (macOS, Linux)
  • fnm Fast and simple Node.js version manager, built in Rust. (macOS, Linux, Windows)
  • mise Polyglot switcher compatible with asdf plugins, built in Rust. (macOS, Linux)
  • n Interactively Manage Your Node.js Versions. (macOS, Linux)
  • nenv Groom your app’s Node environment with nenv (macOS, Linux)
  • nodeenv Virtual environment for Node.js & integrator with virtualenv (macOS, Linux, Windows)
  • nodenv Manage multiple NodeJS versions. (macOS, Linux)
  • nodist Natural node.js and npm version manager for windows. (Windows)
  • nve Run any command on specific Node.js versions (macOS, Linux, Windows)
  • nvm-rust A cross-platform node version manager that doesn't suck (macOS, Linux, 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)
  • setup-node (configuration) Set up your GitHub Actions workflow with a specific version of node.js
  • vfox The Multiple SDK Version Manager

Other products which use .node-version include:

  • bitrise The CI/CD Platform built for Mobile DevOps
  • 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
  • preferred-node-version Get the preferred Node.js version of a project or user
  • Pulumi Deployments Automate, Secure, and Manage Everything You Run in the Cloud
  • ReadyMage Magento 2 and PWA managed auto-scalable infrastructure hosting service.
  • render A Cloud for the New Decade
  • Spaceship Minimalistic, powerful and extremely customizable Zsh prompt
  • starship The minimal, blazing-fast, and infinitely customizable prompt for any shell!
  • typescript-action Create a TypeScript Action with tests, linting, workflow, publishing, and versioning
  • Vercel Conformance Conformance provides tools that run automated checks on your code for product critical issues, such as performance, security, and code health.
  • VMware Tanzu The Tanzu Node.js Buildpack supports several popular configurations for Node.js apps.

Note: nvm does not support reading a .node-version file.

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

Answer from shadowspawn on Stack Overflow
Top answer
1 of 7
81

.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)
  • chnode Changes shell's current Node.js version by updating $PATH (macOS, Linux)
  • dev dev is built on pkgx, a single, standalone binary that can run anything (macOS, Linux)
  • direnv unclutter your .profile. (macOS, Linux)
  • fnm Fast and simple Node.js version manager, built in Rust. (macOS, Linux, Windows)
  • mise Polyglot switcher compatible with asdf plugins, built in Rust. (macOS, Linux)
  • n Interactively Manage Your Node.js Versions. (macOS, Linux)
  • nenv Groom your app’s Node environment with nenv (macOS, Linux)
  • nodeenv Virtual environment for Node.js & integrator with virtualenv (macOS, Linux, Windows)
  • nodenv Manage multiple NodeJS versions. (macOS, Linux)
  • nodist Natural node.js and npm version manager for windows. (Windows)
  • nve Run any command on specific Node.js versions (macOS, Linux, Windows)
  • nvm-rust A cross-platform node version manager that doesn't suck (macOS, Linux, 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)
  • setup-node (configuration) Set up your GitHub Actions workflow with a specific version of node.js
  • vfox The Multiple SDK Version Manager

Other products which use .node-version include:

  • bitrise The CI/CD Platform built for Mobile DevOps
  • 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
  • preferred-node-version Get the preferred Node.js version of a project or user
  • Pulumi Deployments Automate, Secure, and Manage Everything You Run in the Cloud
  • ReadyMage Magento 2 and PWA managed auto-scalable infrastructure hosting service.
  • render A Cloud for the New Decade
  • Spaceship Minimalistic, powerful and extremely customizable Zsh prompt
  • starship The minimal, blazing-fast, and infinitely customizable prompt for any shell!
  • typescript-action Create a TypeScript Action with tests, linting, workflow, publishing, and versioning
  • Vercel Conformance Conformance provides tools that run automated checks on your code for product critical issues, such as performance, security, and code health.
  • VMware Tanzu The Tanzu Node.js Buildpack supports several popular configurations for Node.js apps.

Note: nvm does not support reading a .node-version file.

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

2 of 7
49

There are a few 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
  • nvs - Node Version Switcher

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.

🌐
GitHub
github.com › shadowspawn › node-version-usage
GitHub - shadowspawn/node-version-usage: Document current usage of .node-version file
Allowing any line ending makes it easier for users and especially Windows users to create a file compatible with your product. ... The compatibility table deliberately only covers commonly supported formats and is not intended to be a full feature table. Some utilities do support version specifiers beyond just a numeric version. Often utilities read the .node-version file contents and then use their normal version parsing code.
Starred by 265 users
Forked by 8 users
🌐
Vercel
vercel.com › docs › conformance › rules › REQUIRE_NODE_VERSION_FILE
REQUIRE_NODE_VERSION_FILE
March 4, 2025 - Using a Node.js version file (.node-version or .nvmrc) ensures that all developers and tooling (e.g., CI systems) use the same version of Node.js.
🌐
Mise-en-place
mise.jdx.dev › lang › node.html
Node | mise-en-place
It also supports .tool-versions, .nvmrc or .node-version file to find out what version of Node.js should be used.
🌐
GitHub
github.com › nvm-sh › nvm › issues › 794
Honor .node-version file · Issue #794 · nvm-sh/nvm
August 4, 2015 - Since n already supports .node-version, this would make it so that regardless of the Node version manager used, there could be some degree of guarantee that the correct version will be used.
Published   Aug 04, 2015
🌐
Upsun
fixed.docs.upsun.com › languages › nodejs › node-version.html
Manage Node.js versions | Upsun Fixed Docs
You could also specify a different file or use environment variables. The n package works for various Unix-like systems, including Windows Subsystem for Linux. Add the desired Node.js version to your environment using .nvmrc, .n-node-version, .node-version, or package.json.
Find elsewhere
🌐
Node.js
nodejs.org › en › download
Node.js — Download Node.js®
InfoWant new features sooner? Get the latest Node.js version instead and try the latest improvements!
🌐
GitHub
github.com › nodejs › version-management › issues › 13
Agree on a standard format for a `.node-version` file? · Issue #13 · nodejs/version-management
December 22, 2016 - Agree on a standard format for a .node-version file?#13 · Copy link · ljharb · opened · on Dec 22, 2016 · Issue body actions · It seems like, at a minimum, this would need to support v4.5.6 and 6.7.8 - ie, static versions, both with and without the v. It would certainly not support aliases, since a) that varies widely by version management tool, and b) the point of an "x-version" file is to target one specific version.
Published   Dec 22, 2016
🌐
GitHub
github.com › nvm-sh › nvm
GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
Afterwards, nvm use, nvm install, nvm exec, nvm run, and nvm which will use the version specified in the .nvmrc file if no version is supplied on the command line. For example, to make nvm default to the latest 5.9 release, the latest LTS version, or the latest node version for the current directory:
Starred by 90.3K users
Forked by 9.7K users
Languages   Shell 98.0% | Makefile 1.2%
🌐
Reddit
reddit.com › r/node › is there a project level way to specify nvm versions and avoid nvm use?
r/node on Reddit: Is there a project level way to specify nvm versions and avoid nvm use?
January 8, 2023 -

I love the node version manager, since different projects might require different node versions for various reasons - often the CI/CD tooling or cloud infrastructure requirements.

The problem I have is when switching between projects, I need to remember to run nvm use.

To make sure I don't forget, I fill in the engines section like this:

"engines" : {
"npm" : ">=8.0.0 <9.0.0",
"node" : ">=18.0.0 <19.0.0"
}

However, is there a nicer way where I don't have to switch, and somehow things are symlinked to the right place.

I use Windows out of habit, but happy for a Linux answer as I am happy to work there too.

🌐
Danielabaron
danielabaron.me › blog › consistent-node-version
Maintain Node.js Version Consistency · Daniela Baron
For example, suppose the .nvmrc file specifies Node.js v20.5.0, which isn't currently installed: # Check what Node.js version this project requires cd /path/to/some_project cat .nvmrc # 20.5.0 # Try to use it nvm use # Found '/path/to/some_project/.nvmrc' with version <20.5.0> # N/A: version "v20.5.0" is not yet installed.
🌐
Medium
medium.com › @arunangshudas › managing-node-js-versions-with-nvm-node-version-manager-054a4588e303
Managing Node.js Versions with nvm (Node Version Manager) | by ...
June 30, 2024 - To ensure that each of your projects uses the correct Node.js version, you can use a .nvmrc file. This file should contain the version number that the project requires.
🌐
To The New
tothenew.com › home › node version using .nvmrc
Node Version Using .nvmrc | TO THE NEW Blog
November 28, 2024 - Step 6:- Here, we can switch to the Node.js version based on the requirements. ... The .nvmrc file is a simple text file that configuration file for nvm (Node Version Manager). It’s used to install and manage the node.js versions.
🌐
Laravel Herd
herd.laravel.com › docs › macos › technology › node-versions
Manage Node.js - Laravel Herd
By default, the Node version available via CLI will be the most recent one. However, if you need to support different Node.js versions for different sites, you may use the isolated Node functionality. This configures Herd to use the specified Node version for the site, regardless of the global Node version.
🌐
npm
npmjs.com › package › n
n – Interactively Manage Your Node.js Versions
.node-version: version on single line. Used by multiple tools: node-version-usage ... The engine label looks for a package.json file and reads the engines field to determine compatible Node.js.
      » npm install n
    
Published   May 21, 2025
Version   10.2.0
Author   TJ Holowaychuk
🌐
Readymage
help.readymage.com › project-development › node.js-version
Node.js version | ReadyMage Help
.node-version file syntax allows you to specify the exact version that you need.
🌐
Netlify
answers.netlify.com › features
Specifying a Node version - Features - Netlify Support Forums
February 27, 2020 - In your build instructions for Node apps (Manage build dependencies | Netlify Docs), the recommended way to set a Node version is via a .node-version file or NODE_VERSION env var; and similarly use NPM_VERSION to set the npm version, and ...