Skip to content

Fix admin Docker build on Node 26: corepack no longer ships with Node - #320

Merged
stephane-segning merged 1 commit into
mainfrom
fix/admin-corepack-node26
Aug 16, 2026
Merged

Fix admin Docker build on Node 26: corepack no longer ships with Node#320
stephane-segning merged 1 commit into
mainfrom
fix/admin-corepack-node26

Conversation

@stephane-segning

Copy link
Copy Markdown
Contributor

Summary

One-line fix to frontends/apps/admin/Dockerfile: install corepack explicitly (pinned corepack@0.35.0) before the existing corepack enable && corepack prepare pnpm@11.18.0 --activate, because Node 26 removed corepack from its distribution.

Intent

Fixes the red release workflow on main — the build and push admin job (run 31931499510) failed on the #319 merge commit with:

#11 0.053 /bin/sh: 1: corepack: not found
#11 ERROR: process "/bin/sh -c corepack enable && corepack prepare pnpm@11.18.0 --activate" did not complete successfully: exit code: 127

Root cause: #319 moved the admin base image node:22-bookworm-slimnode:26-bookworm-slim. Node 26 removed corepack from the distribution — verified empirically: node:26-bookworm-slim (v26.7.0) has npm but no corepack binary.

Why CI did not catch it

actions/setup-node's Node 26 still ships corepack (the CI Enable corepack steps pass on node-version '26'), and CI never builds the admin Docker image — only the release workflow does (it runs on push-to-main/tag). So #319's green PR checks were structurally unable to see this failure: the first execution of the changed code was the release job after merge — the exact "workflow first executes after merge" failure class AGENTS.md documents for release.yml.

Scope

  • frontends/apps/admin/Dockerfile builder stage — one RUN line, plus an updated comment explaining the gap.
  • No other place uses a Node base image or corepack under the Node distribution (all other Dockerfiles are Rust/distroless; the release workflow's publish-node-sdk job uses actions/setup-node, which still has corepack).

Verification

The exact failing step, run for real:

docker build -f frontends/apps/admin/Dockerfile -t vsms-admin-verify:corepack-fix .

Completes end to end: npm install -g corepack@0.35.0corepack enablecorepack prepare pnpm@11.18.0 --activatepnpm install --frozen-lockfileturbo run build --filter=admin... (Next build, 21.8s) → runtime stage assembled and exported. This is the identical step that failed in CI.

The release job itself will not re-run on this PR (it triggers on main push/tag) — the fix lands on main and the next release-workflow run is the durable proof.

Risk Assessment

  • Low. Adds a pinned install of corepack (0.35.0) into the builder stage; the mechanism it feeds (pnpm@11.18.0, still exactly pinned) is unchanged.
  • If the pinned corepack 0.35.0 were ever incompatible with a future packageManager bump, it fails loudly at build time, not silently.

AI Usage Declaration

  • A human directed this change and is accountable for it.
  • Claims in this PR were verified against the repository or a running system, rather than assumed. (Image contents verified by pulling node:26-bookworm-slim and inspecting; the build itself run to completion.)

Reviewer Focus

  • Whether corepack should instead be dropped from the Dockerfile in favour of a direct npm install -g pnpm@11.18.0 (simpler, one fewer tool) — I kept corepack for consistency with the CI workflows' own corepack-based flow.

Node 26 removed corepack from the distribution (verified: node:26-bookworm-slim
has npm 11.19.0 but no corepack binary), so the builder stage's
'RUN corepack enable && corepack prepare pnpm@11.18.0 --activate' failed
with '/bin/sh: 1: corepack: not found' (exit 127) — the exact failure in
the 'build and push admin' release job on the #319 merge commit.

actions/setup-node's Node 26 still ships corepack, which is why CI's own
pnpm jobs pass while the Docker build breaks — and CI never builds the
admin image (only the release workflow does), so the green PR checks on
#319 could not have caught this. Found only by the release job running on
the merged main, the 'workflow first executes after merge' failure class.

Fix: install corepack explicitly and pinned (corepack@0.35.0) before using
it to honour the packageManager pin (pnpm@11.18.0), exactly as before.

Verified: 'docker build -f frontends/apps/admin/Dockerfile .' completes end
to end (corepack install, corepack prepare pnpm@11.18.0, pnpm install
--frozen-lockfile, turbo build --filter=admin..., runtime stage) — the
identical step that failed in CI.
@changeset-bot

changeset-bot Bot commented Aug 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ccc5761

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@stephane-segning
stephane-segning merged commit cf2a086 into main Aug 16, 2026
9 checks passed
@stephane-segning
stephane-segning deleted the fix/admin-corepack-node26 branch August 16, 2026 08:30
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.

1 participant