From bdcf617fbb41604b2bf8d2e4586a4fcf8c748e10 Mon Sep 17 00:00:00 2001 From: "stefan.kunz" Date: Sat, 13 Jun 2026 09:52:08 +0200 Subject: [PATCH] fix(ci): align pnpm 11 and Node 22 so CI and Docker builds pass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .github/workflows/ci.yml | 8 -------- .nvmrc | 2 +- Dockerfile | 9 ++++++--- README.md | 2 +- package.json | 1 + 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36900042..e706a5f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,8 +16,6 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v4 - with: - version: 9 - name: Setup Node.js uses: actions/setup-node@v4 @@ -40,8 +38,6 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v4 - with: - version: 9 - name: Setup Node.js uses: actions/setup-node@v4 @@ -65,8 +61,6 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v4 - with: - version: 9 - name: Setup Node.js uses: actions/setup-node@v4 @@ -113,8 +107,6 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v4 - with: - version: 9 - name: Setup Node.js uses: actions/setup-node@v4 diff --git a/.nvmrc b/.nvmrc index 209e3ef4..2bd5a0a9 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20 +22 diff --git a/Dockerfile b/Dockerfile index be929db9..820b526c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,13 +7,16 @@ # Run them as a separate release/pre-deploy step, e.g. `pnpm db:migrate` # (see README "Deployment"). -FROM node:20-alpine AS base -RUN npm install -g pnpm@9 +FROM node:22-alpine AS base +# Use the pnpm version pinned in package.json's "packageManager" field via corepack. +RUN corepack enable # --- Dependencies --- FROM base AS deps WORKDIR /app -COPY package.json pnpm-lock.yaml ./ +# pnpm-workspace.yaml carries the build-script allowlist (allowBuilds) and +# overrides, so it must be present for the install to behave like local/CI. +COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ RUN pnpm install --frozen-lockfile # --- Build --- diff --git a/README.md b/README.md index 1ca07d33..87322b5e 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Claude will run the skill end-to-end and ask you the few decisions it actually n ## Prerequisites -- Node.js 20 or newer +- Node.js 22 or newer (the pinned `pnpm` requires Node 22.13+) - Git - Docker **or** Podman (for the included PostgreSQL service and for building the deployment image). For `podman compose`, also install a compose provider (`docker-compose` or `podman-compose`). - A package manager: `pnpm`, `npm`, or `yarn` diff --git a/package.json b/package.json index 7ba216fd..5e4cfb25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "agentic-coding-starter-kit", "version": "1.1.2", + "packageManager": "pnpm@11.6.0", "scripts": { "dev": "next dev --turbopack", "build": "next build",