To find the Node.js version a project expects on your Mac, inspect its version files and configuration before checking the version active in Terminal. Start with .nvmrc, then check package.json for volta and engines settings. These clues have different meanings: some pin a version for a tool, while others describe a compatibility range.
1. Open the project folder in Terminal
In Finder, locate the project folder. Control-click it and choose New Terminal at Folder if that option is available; otherwise open Terminal and navigate to the folder with cd. You can drag the folder from Finder into the Terminal window after typing cd , then press Return. This avoids typing a path that contains spaces incorrectly.
Run these read-only commands from the project directory:
ls -a
grep -nE '"(engines|volta)"|"node"' package.json .nvmrc
ls -a includes hidden files such as .nvmrc. grep prints matching lines from files that exist; if one file is absent, it may print an error for that file, which does not mean the project is broken. To inspect a particular file more fully, use sed -n '1,160p' package.json or sed -n '1,20p' .nvmrc when the file exists. These commands display text; they do not change the project.
2. Read .nvmrc as a version-manager instruction
If you find .nvmrc, read its contents. A value such as 20.16.0 signals that the project specifies that Node.js version for users of nvm. nvm also accepts version selectors such as 20 or lts/*, so the file may not identify one fixed patch release. The nvm documentation says its commands can find .nvmrc in the project directory or a parent directory, and nvm use with no version uses the file when available. nvm README: .nvmrc
On macOS, check whether nvm is available and what it resolves in this directory:
command -v nvm
nvm use
node --version
command -v nvm should print nvm when nvm is loaded in the current shell. If the command is unavailable, do not assume .nvmrc is invalid; the file can still document the project's choice even if you do not have nvm installed or loaded. nvm use selects the version in the file if it is installed; if it is missing, nvm may ask you to install it. Only run an installation if you intend to add that Node version to your Mac.
3. Check package.json for Volta and compatibility ranges
Look for a top-level volta object. For example:
"volta": {
"node": "20.16.0"
}
This is a Node version pin for Volta-managed projects. Volta documents that volta pin stores the selected tool versions in package.json, and that Volta routes Node commands to the project version. Understanding Volta If you use Volta, node --version from the project directory can show which version the toolchain runs; without Volta, the object remains project metadata, not a command for macOS Terminal.
Also inspect the engines property, commonly written like this:
"engines": {
"node": ">=18 <23"
}
This gives a compatibility range, not necessarily the version developers have installed. npm’s documentation describes engines.node as specifying which Node versions a package works with; unless engine-strict is enabled, npm treats it as advisory and may only warn during dependency installation. npm package.json documentation A broad range means the project claims compatibility across the permitted versions; it does not establish one exact expected version.
4. Compare the files and resolve conflicting clues
Treat an exact .nvmrc or Volta pin as the strongest sign of a particular tool-managed version. Treat engines.node as a compatibility constraint. If the files disagree—for example, .nvmrc says 18 but engines.node requires >=20—do not silently pick one. The files may be stale, may serve different tools, or may reflect a recent change. Check the project’s README and setup instructions, then ask the maintainers or team which file they expect contributors to follow.
Projects can also define versions in files used by other version managers or in CI configuration. If .nvmrc and package.json have no useful answer, search visible project files with ls -a and inspect setup documentation and workflow configuration. A CI file may show the version used for automated builds, but that can differ from the local developer setup; confirm the context before treating it as the project’s requirement.
5. Verify the Node version your Mac is actually using
After identifying the project's instruction, compare it with the active runtime:
node --version
command -v node
The first command reports the active Node version; the second shows the executable path selected through your shell’s PATH. These describe your current Terminal environment, not the project's requirement by themselves. With nvm, run nvm use from the project directory before checking. With Volta, run the checks from that directory so its project settings can apply. If the reported version still differs from the pin, the relevant manager may not be installed, loaded, or controlling the node executable in this shell.
The practical answer comes from reading both sides: the repository’s version declaration tells you what it asks for, while node --version tells you what your Mac is currently running. If those do not match, resolve the manager or project instruction before relying on local results.
Sources
nvm/README.md — nvm-sh
Understanding Volta — Volta
package.json | npm Docs — npm