Skip to content

🐛 fix(docker): replace pnpm init with static package.json in /deps#14576

Merged
Innei merged 1 commit into
release/weekly-20260509from
fix/docker-pnpm-init-corepack
May 9, 2026
Merged

🐛 fix(docker): replace pnpm init with static package.json in /deps#14576
Innei merged 1 commit into
release/weekly-20260509from
fix/docker-pnpm-init-corepack

Conversation

@Innei

@Innei Innei commented May 9, 2026

Copy link
Copy Markdown
Member

Summary

Docker PR Build (#14563 run 25597803295) was failing at the [builder 7/11] step:

Invalid package manager specification in package.json (pnpm@^11.0.9); expected a semver version

Root cause: pnpm init (pnpm 10.33) writes a devEngines.packageManager: { version: "^11.0.9" } field into the generated package.json. The next command (pnpm add pg drizzle-orm) triggers corepack@latest to validate that field — it rejects ranges and aborts.

Fix: skip pnpm init and write a minimal static package.json so corepack has nothing to validate.

Test plan

`pnpm init` writes `devEngines.packageManager: { version: "^11.0.9" }`
into the generated package.json. corepack@latest rejects ranges in this
field with "Invalid package manager specification ... expected a semver
version", causing the subsequent `pnpm add pg drizzle-orm` to exit 1.

Skip init and write a minimal package.json directly so corepack has
nothing to validate.
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 9, 2026
@vercel

vercel Bot commented May 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub Building Building Preview, Comment May 9, 2026 11:35am

Request Review

@dosubot dosubot Bot added the docker label May 9, 2026
@Innei Innei merged commit 8ed31df into release/weekly-20260509 May 9, 2026
32 of 37 checks passed
@Innei Innei deleted the fix/docker-pnpm-init-corepack branch May 9, 2026 11:36
gfsaaser24 added a commit to gfsaaser24/lobehub that referenced this pull request May 22, 2026
Cherry-picks upstream lobehub#14576 (8ed31df, 2026-05-09).
`pnpm init` in pnpm v11+ writes devEngines.packageManager.version as a
semver range, which corepack then rejects ("Invalid package manager
specification ... expected a semver version"). Coolify build server's
node:22-slim image picked up a newer corepack and started failing
builds. Static package.json sidesteps the pnpm/corepack incompat
without pinning anything.

Refs: pnpm/pnpm#11388
      pnpm/pnpm#11732

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mrsimpson pushed a commit to mrsimpson/lobehub that referenced this pull request May 29, 2026
…obehub#14576)

`pnpm init` writes `devEngines.packageManager: { version: "^11.0.9" }`
into the generated package.json. corepack@latest rejects ranges in this
field with "Invalid package manager specification ... expected a semver
version", causing the subsequent `pnpm add pg drizzle-orm` to exit 1.

Skip init and write a minimal package.json directly so corepack has
nothing to validate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant