You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The actions/setup-node action supports a node-version-file input, which can point to a file that contains the version of node.js to use. It would be great if this action could also support reading the runtime version from a file (other than package.json).
We use a .node-version file to automatically get the correct Node.js version based on folder, using nvs auto. There is a PR to add that support, and if that was merged, I'd be happy for package.json to be the source of truth for the Node.js version instead, but until that point, I'd love if I could keep using .node-version without duplicating that version elsewhere in the codebase.
Reacted by Hugo van Rijswijk, Hendrik Schmidt, Manoel Aranda Neto, Koji Wakamiya, Takuya Mikami, Rafal Chlodnicki, Michael Kriese, Plorence, owine, Chemi Atlow and 12 more
nvm also doesn't support reading node version from package-json (and is not likely to support it) thus without support for node-version-filepnpm/setup can't be used as a replacement for actions/setup-node without then also maintaining node version in two places.
.node-version is supported by Renovate, and it is what I always use to control node in CI.
Enforcing arbitrary heuristic versions in package.json is a maintenance overhead I would prefer not to take on. So .node-version is the "default" and otherwise our team can flexibly control their own node versions (ie if they please they can use nightlies or higher major versions for tooling features)
We would like to move to the pnpm/setup but don't really want to maintain the devEngines.runtime and the .nvmrc file so this would be really nice to have it supported.
Reacted by Samuel MARLHENS, axel7083, Simon Rey and Kody
Activity
rchl-u commentedon Aug 5, 2026
nvmalso doesn't support reading node version frompackage-json(and is not likely to support it) thus without support fornode-version-filepnpm/setupcan't be used as a replacement foractions/setup-nodewithout then also maintaining node version in two places.alexaka1 commentedon Sep 4, 2026
.node-versionis supported by Renovate, and it is what I always use to control node in CI.Enforcing arbitrary heuristic versions in package.json is a maintenance overhead I would prefer not to take on. So .node-version is the "default" and otherwise our team can flexibly control their own node versions (ie if they please they can use nightlies or higher major versions for tooling features)
Edit:
I have checked, and Renovate does not support these fields, so this is not viable for me sadly. https://redirect.github.com/renovatebot/renovate/issues/38067
axel7083 commentedon Sep 18, 2026
This is a much needed feature, we (https://github.com/podman-desktop/podman-desktop) are currently using both
pnpm/action-setupandactions/setup-nodein our CIWe would like to move to the
pnpm/setupbut don't really want to maintain thedevEngines.runtimeand the.nvmrcfile so this would be really nice to have it supported.