Skip to content

fix(ci): specify pnpm version in pages-deployment workflow#426

Merged
ss-o merged 3 commits into
mainfrom
copilot/fix-pnpm-version-setup
May 23, 2026
Merged

fix(ci): specify pnpm version in pages-deployment workflow#426
ss-o merged 3 commits into
mainfrom
copilot/fix-pnpm-version-setup

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 23, 2026

pnpm/action-setup@v6 requires an explicit version when packageManager is absent from package.json. The deploy job was failing immediately with Error: No pnpm version is specified.

Change

Added with: version: 10 to the pnpm setup step:

- name: "📦 Setup pnpm"
  uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
  with:
    version: 10
Original prompt

Fix the failing GitHub Actions job in repository z-shell/.github.

Context:

Observed workflow snippet:

  • The workflow currently contains:
    • step name: 📦 Setup pnpm
    • uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
    • no with: block specifying a pnpm version

Requested change:

  • Update .github/workflows/pages-deployment.yml so the pnpm/action-setup step explicitly specifies a pnpm version.
  • Prefer a straightforward, low-risk fix that unblocks the workflow.
  • Keep the change minimal and focused on resolving the failure.

Acceptance criteria:

  • The workflow includes a with: block under the pnpm setup step.
  • The block sets version to a valid pnpm major version (for example 9).
  • No unrelated files are changed unless required.
  • Open a pull request with the fix.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.

Assistant: The failure is caused by the pnpm setup step being incomplete.

Root cause

In the job logs, the failing step reports:

Error: No pnpm version is specified.

That matches the workflow definition in pages-deployment.yml, where the pnpm action is used without a with.version value:

  • .github/workflows/pages-deployment.yml:28-29
- name: "📦 Setup pnpm"
  uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8

Recent versions of that action require an explicit pnpm version unless it can read one from package metadata.

Fix

Set the pnpm version directly in the workflow.

Recommended patch

- name: "📦 Setup pnpm"
  uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
  with:
    version: 9

Updated section

- name: "📦 Setup pnpm"
  uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
  with:
    version: 9

- name: "⎔  Setup node"
  uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
  with:
    node-version: lts/*
    cache: "pnpm"

Why this solves it

The build step depends on pnpm install --prod && pnpm run build, so the runner must have pnpm installed first. Adding version lets the setup action install pnpm instead of failing before the build begins.

Alternative

If this repo already defines pnpm in packageManager inside package.json, you could rely on that instead, but the most reliable fix for this workflow is to declare the version explicitly in the job itself.

User: open pr

Assistant: I’ve started the PR creation request for z-shell/.github; once it finishes, I’ll share the PR link and summary.

This pull request was created from Copilot chat.

@ss-o ss-o marked this pull request as ready for review May 23, 2026 02:11
Copilot AI review requested due to automatic review settings May 23, 2026 02:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Copilot AI requested a review from a team as a code owner May 23, 2026 02:12
Copilot AI changed the title [WIP] Fix missing pnpm version in GitHub Actions setup fix(ci): specify pnpm version in pages-deployment workflow May 23, 2026
Copilot finished work on behalf of ss-o May 23, 2026 02:12
Copilot AI requested a review from ss-o May 23, 2026 02:12
Comment thread .github/workflows/pages-deployment.yml
Copilot finished work on behalf of ss-o May 23, 2026 02:14
Copilot AI requested a review from ss-o May 23, 2026 02:14
@ss-o ss-o merged commit 8c48ac8 into main May 23, 2026
3 checks passed
@ss-o ss-o deleted the copilot/fix-pnpm-version-setup branch May 23, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants