pnpm / pnpm/action-setup

pnpm gives wrong version

Open
#231 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.3k
Forks
217
Avg merge
8h 42m
Merged PRs (30d)
1

Description

 ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)

Your pnpm version is incompatible with "/home/runner/work/wgsl-analyzer/wgsl-analyzer/editors/code".

Expected version: ^10.33.0
Got: 11.0.0-beta.4-1

package.json:

...
	"engines": {
		"vscode": "^1.115.0",
		"pnpm": "^10.33.0"
	},
...

workflow:

env:
  PNPM_VERSION: "10.33.0"
...
      - name: Set up Node.js
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24

      - name: Install pnpm
        uses: pnpm/action-setup@08c4be7e2e672a47d11bd04269e27e5f3e8529cb # v6.0.0
        with:
          package_json_file: ./editors/code/package.json
          version: ${{ env.PNPM_VERSION }}
...
      - name: Update engines.vscode
        run: |
          pnpm dlx json -I -f ./editors/code/package.json -e "this.engines = this.engines || {}; this.engines.vscode = '^${STEPS_TYPES_VERSION_OUTPUTS_VERSION}'" # error is here
          pnpm --dir editors/code install --frozen-lockfile
          pnpm --dir editors/code run format
        env:
          STEPS_TYPES_VERSION_OUTPUTS_VERSION: ${{ steps.types-version.outputs.version }}

the run:
https://github.com/wgsl-analyzer/wgsl-analyzer/actions/runs/24618186327/job/71984008282?pr=1028

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the shown editors/code/package.json engines entry and the workflow's Install pnpm and Update engines.vscode steps. Reproduce the linked workflow run and inspect how pnpm/action-setup handles package_json_file, version, and the subsequent pnpm dlx command. Done means the workflow no longer reports an incompatible pnpm version and the frozen install and format steps proceed.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, node.js, typescript
Domain
ci-cd, devops, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.