Skip to content

Support reading node version from engines.node field in package.json #38

Open

Description

@neefrehman

We currently use the engines and packageManager field in our package.json file like so:

"packageManager": "pnpm@11.22.0",
"engines": {
  "node": "24.19.0"
}

We deploy to Vercel, which reads from engines.node (corepack support, which would use devEngines, isn't stable on Vercel), and we also use Renovate which doesn't support devEngines (renovatebot/renovate#38067). As a result it would be great if pnpm/setup could use engines.node if devEngines.runtime is not set.

Activity

  1. jonasgeiler commented on Aug 31, 2026

    @jonasgeiler

    I support this.
    I'm trying to migrate away from actions/setup-node, which supports setting node-version-file to a package.json file like this:

          - name: Set up Node.js
            uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
            with:
              node-version-file: package.json
              cache: pnpm

    With a package.json file like this:

    {
      // ...
      "engines": {
        "node": ">=24"
      },
      // ...
    }

    It then downloads and set's up Node.js v24.x.x.
    I would love to see a similar feature in pnpm/setup in order to move away from a pnpm/action-setup + actions/setup-node combo.

    Here is kinda how actions/setup-node does it:
    https://github.com/actions/setup-node/blob/94196ee1d15439c1b6651cd87ef14e88ec435966/src/distributions/base-distribution.ts#L65-L87

  2. nikitaignatovich-innowise commented on Sep 1, 2026

    @nikitaignatovich-innowise

    @jonasgeiler it seems like what using the actions/setup-node with pnpm/setup right now is ovekill

  3. jonasgeiler commented on Sep 1, 2026

    @jonasgeiler

    @nikitaignatovich-innowise wrote:
    it seems like what using the actions/setup-node with pnpm/setup right now is ovekill

    Yeah? I'm not doing that. I am using pnpm/action-setup with actions/setup-node but I want to move towards only using pnpm/setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions