Skip to content

fix(ci): align pnpm 11 and Node 22 so CI and Docker builds pass#5

Merged
stefanowitschdev merged 1 commit into
masterfrom
fix/ci-pnpm-version
Jun 13, 2026
Merged

fix(ci): align pnpm 11 and Node 22 so CI and Docker builds pass#5
stefanowitschdev merged 1 commit into
masterfrom
fix/ci-pnpm-version

Conversation

@stefanowitschdev

@stefanowitschdev stefanowitschdev commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Problem

Every CI run failed within ~15–20s at the Setup Node.js step, before any lint/build/test:

pnpm store path --silent
 ERROR  packages field missing or empty

Root cause: pnpm/Node version drift. CI pinned pnpm 9, but the project keeps its settings (allowBuilds, overrides) in pnpm-workspace.yaml (a pnpm 10+/11 feature). pnpm 9 treats that file as a workspace definition, requires a packages: field, and aborts. In turn, pnpm 11 requires Node 22.13+, while the project still targeted Node 20 (.nvmrc, Dockerfile, README) — so simply pinning pnpm 11 made pnpm crash under Node 20 (ERR_UNKNOWN_BUILTIN_MODULE). The same pnpm 9 / Node 20 mismatch also affected the Docker build.

Fix — align on pnpm 11 + Node 22

  • package.json — add "packageManager": "pnpm@11.6.0".
  • .github/workflows/ci.yml — drop the hard-coded version: 9; pnpm/action-setup reads the version from packageManager. Node comes from .nvmrc.
  • .nvmrc2022.
  • Dockerfile — base node:20-alpinenode:22-alpine; install pnpm via corepack enable (honours packageManager) instead of pnpm@9; copy pnpm-workspace.yaml into the deps stage so the build-script allowlist (allowBuilds) and overrides apply during pnpm install.
  • README — note the Node 22+ requirement.

Verification

  • podman build produces a working image — boot test returns HTTP 200.
  • pnpm install --frozen-lockfile and pnpm lint pass locally.
  • CI on this PR should now run the full pipeline (lint, typecheck, build, e2e).

Follow-up: the create-agentic-app/template/ copy still carries the old Node 20 / pnpm 9 values; it should be refreshed via pnpm sync-template after this merges.

🤖 Generated with Claude Code

CI pinned pnpm 9 (pnpm/action-setup version: 9), but the project keeps its
settings (allowBuilds, overrides) in pnpm-workspace.yaml — a pnpm 10+/11
feature. pnpm 9 treats that file as a workspace definition and aborts with
"packages field missing or empty", so every job died at "Setup Node.js".
pnpm 11 in turn requires Node 22.13+, while the project still targeted Node 20.

Align everything on pnpm 11 + Node 22:

- package.json: add "packageManager": "pnpm@11.6.0".
- ci.yml: drop the hard-coded `version: 9`; pnpm/action-setup reads the version
  from packageManager. Node comes from .nvmrc (now 22), so jobs follow suit.
- .nvmrc: 20 -> 22.
- Dockerfile: base image node:20 -> node:22-alpine; install pnpm via
  `corepack enable` (honours packageManager) instead of `pnpm@9`; also copy
  pnpm-workspace.yaml into the deps stage so the build-script allowlist and
  overrides apply during `pnpm install`.
- README: note Node 22+ requirement.

Verified: `podman build` produces a working image (HTTP 200 boot test);
`pnpm install --frozen-lockfile` and `pnpm lint` pass locally.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@stefanowitschdev stefanowitschdev changed the title fix(ci): use pnpm 11 to match the project's workspace settings fix(ci): align pnpm 11 and Node 22 so CI and Docker builds pass Jun 13, 2026
@stefanowitschdev stefanowitschdev merged commit 8577d0a into master Jun 13, 2026
4 checks passed
@stefanowitschdev stefanowitschdev deleted the fix/ci-pnpm-version branch June 13, 2026 08:03
stefanowitschdev added a commit that referenced this pull request Jun 13, 2026
Re-run `pnpm sync-template` so create-agentic-app/template/ picks up the
pnpm 11 + Node 22 changes from #5: packageManager field, .nvmrc 22, and the
Dockerfile (node:22-alpine + corepack, pnpm-workspace.yaml in the deps stage).

Co-authored-by: stefan.kunz <stefan.kunz@adbsafegate.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants