nvm config file locations
Commands use a POSIX shell (macOS, Linux, or WSL). Install the named editor or CLI first. Before using an environment-variable path, check that the variable is set to a non-empty, intended path. When using vi or Notepad, ensure the parent directory exists and is writable. A missing file is created when you save it; Notepad may ask to create it.
This page covers nvm-sh on macOS, Linux, and Windows through WSL using a POSIX shell. Native Windows nvm-windows is a separate product and is not covered. With no explicit version, nvm use searches upward from the current directory for the nearest .nvmrc; files are not merged. Creating .nvmrc alone does not switch Node.js versions: run nvm use. Automatic switching requires separate shell integration.
Node.js version file
Nearest fileThe nearest .nvmrc selects the version when no version is supplied to nvm use. Run commands from the project root or the ancestor directory whose .nvmrc you intend to edit.
Config file location
Contains one Node.js version or alias, such as lts/*, followed by a newline. Run nvm use from this directory or a descendant after editing. If that version is not installed, install it with nvm install.<project>/.nvmrcCommands
vi "./.nvmrc"
Inspect configuration
nvm currentOfficial nvm documentation