Skip to content

fix: pin pnpm@10.30.2 in admin, live, space Dockerfiles#28

Merged
UsamaSadiq merged 2 commits into
foss-mainfrom
fix/pin-pnpm-corepack-dockerfiles
May 14, 2026
Merged

fix: pin pnpm@10.30.2 in admin, live, space Dockerfiles#28
UsamaSadiq merged 2 commits into
foss-mainfrom
fix/pin-pnpm-corepack-dockerfiles

Conversation

@aznszn
Copy link
Copy Markdown

@aznszn aznszn commented May 14, 2026

Summary

  • corepack enable pnpm (no version) lets corepack resolve pnpm from the workspace packageManager field, pulling down pnpm 11.x
  • pnpm 11 moved the global bin to $PNPM_HOME/bin instead of $PNPM_HOME, breaking pnpm add -g turbo in builder stages
  • Adds corepack prepare pnpm@10.30.2 --activate to builder and installer stages in Dockerfile.admin, Dockerfile.live, and Dockerfile.space, matching the pattern already applied to Dockerfile.web in PR fix: pin pnpm@10.30.2 in web Dockerfile builder stage #22

Test plan

  • docker build -f apps/admin/Dockerfile.admin . completes without error
  • docker build -f apps/live/Dockerfile.live . completes without error
  • docker build -f apps/space/Dockerfile.space . completes without error

🤖 Generated with Claude Code

…erfiles

corepack enable without a version pinned causes corepack to resolve pnpm
from the workspace packageManager field (11.x), which moved the global bin
to $PNPM_HOME/bin — breaking pnpm add -g in each builder stage.

Add `corepack prepare pnpm@10.30.2 --activate` to builder and installer
stages in Dockerfile.admin, Dockerfile.live, and Dockerfile.space,
matching the pattern already used in Dockerfile.web (PR #22).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@hunzlahmalik hunzlahmalik left a comment

Choose a reason for hiding this comment

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

The fix mirrors PR #22 cleanly, but two things worth tightening before merge:

Inconsistency between the three Dockerfiles

The installer stage ends up using a different incantation in space vs. admin/live:

installer stage
Dockerfile.admin:69 corepack prepare pnpm@10.30.2 --activate
Dockerfile.live:36 corepack prepare pnpm@10.30.2 --activate
Dockerfile.space:70 corepack enable pnpm

By line 70 in space, package.json is present (COPY at L62-67), so corepack enable pnpm should resolve to 10.30.2 via the packageManager field — but that re-introduces dependence on the same field-resolution path whose absence caused this bug in the builder stage. Safer to use corepack prepare pnpm@10.30.2 --activate here too, for parity with the other two and defense-in-depth.

Separately, Dockerfile.space:10 changes corepack enable pnpmcorepack enable (drops the pnpm arg). Not wrong (it now matches Dockerfile.live:7), but it's an unrelated stylistic change folded into a behavioral fix — easier to review if you either revert it or call it out explicitly in the PR body.

Extract the pnpm version to an ARG

pnpm@10.30.2 is now hard-coded in 5 places across the 4 Dockerfiles plus package.json. A future bump means hunting them all down. Same pattern TURBO_VERSION already uses in Dockerfile.live / Dockerfile.web:

ARG PNPM_VERSION=10.30.2
RUN corepack prepare pnpm@${PNPM_VERSION} --activate

Not blocking — just future-proofing.

Comment thread apps/space/Dockerfile.space Outdated
Replace `corepack enable pnpm` with `corepack prepare pnpm@10.30.2 --activate`
in the installer stage for parity with Dockerfile.admin and Dockerfile.live.
Also restore explicit `corepack enable pnpm` in the base stage for clarity.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aznszn
Copy link
Copy Markdown
Author

aznszn commented May 14, 2026

Good catches, both addressed in the follow-up commit (704f5b5):

  1. space installer inconsistency — changed corepack enable pnpmcorepack prepare pnpm@10.30.2 --activate in the installer stage, matching admin and live.

  2. base stage corepack enablecorepack enable pnpm — restored the explicit pnpm target for clarity (the change was unintentional noise).

On the ARG PNPM_VERSION suggestion — skipping it for now. Since ARG is Dockerfile-scoped and resets between stages, it doesn't actually reduce the cross-file update burden on a version bump. The main upside would be build-time override ability, which isn't something we need here. Happy to revisit if the team feels differently.

@UsamaSadiq UsamaSadiq merged commit 6357bb2 into foss-main May 14, 2026
8 checks passed
aznszn added a commit that referenced this pull request May 14, 2026
* fix: pin pnpm@10.30.2 via corepack prepare in admin, live, space Dockerfiles

corepack enable without a version pinned causes corepack to resolve pnpm
from the workspace packageManager field (11.x), which moved the global bin
to $PNPM_HOME/bin — breaking pnpm add -g in each builder stage.

Add `corepack prepare pnpm@10.30.2 --activate` to builder and installer
stages in Dockerfile.admin, Dockerfile.live, and Dockerfile.space,
matching the pattern already used in Dockerfile.web (PR #22).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(space): use corepack prepare to pin pnpm@10.30.2 in installer stage

Replace `corepack enable pnpm` with `corepack prepare pnpm@10.30.2 --activate`
in the installer stage for parity with Dockerfile.admin and Dockerfile.live.
Also restore explicit `corepack enable pnpm` in the base stage for clarity.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
hunzlahmalik added a commit that referenced this pull request May 20, 2026
revert: retire pnpm@10.30.2 pin (PRs #22 + #28) — fixed upstream in v1.3.1
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