Skip to content

fix(docker): copy pnpm-workspace.yaml into the deps stage - #3

Merged
SupaOhm merged 2 commits into
mainfrom
fix/docker-lockfile
Aug 5, 2026
Merged

SupaOhm merged 2 commits into
mainfrom
fix/docker-lockfile

Conversation

@SupaOhm

@SupaOhm SupaOhm commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Docker build is broken

The deps stage copies only package.json and pnpm-lock.yaml. pnpm 10+ reads overrides from pnpm-workspace.yaml (this repo pins postcss: 8.5.14 there), and the lockfile records them — so a frozen install without that file aborts:

ERR_PNPM_LOCKFILE_CONFIG_MISMATCH
Cannot proceed with the frozen installation. The current "overrides"
configuration doesn't match the value found in the lockfile

CI and local builds never hit it because they run against a full checkout where the file is always present. Only the Docker image, which copies a deliberate subset, is affected.

Verification

Docker isn't running here, so rather than claim an untested fix I mirrored the deps stage in a scratch directory using the exact file set it copies, with the same pnpm (11.0.9) and the same --frozen-lockfile flag:

files copied result
package.json + pnpm-lock.yaml (before) ERR_PNPM_LOCKFILE_CONFIG_MISMATCH
+ pnpm-workspace.yaml (after) Done in 2.4s using pnpm v11.0.9

This proves the failing step and the fix, not the whole image build — a real docker build is still worth running before relying on it.

Lint clean, typecheck clean, 37/37 tests, next build clean.

Also lands local state main didn't have

You asked for everything your working copy had that main didn't. That was two things:

  • next-env.d.ts → points at .next/dev/types, what next dev writes. Next rewrites this per command (next build flips it back to .next/types), so it will keep showing as modified whichever variant is committed. CI is unaffected — pnpm typecheck runs next typegen first. If the churn is annoying, gitignoring the file is the usual escape; say the word.
  • .gitignore → excludes .claude/worktrees/, the scratch checkouts agent worktrees create. That directory was showing as untracked in your working copy. Scoped to the subdirectory so .claude/settings.json stays trackable.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BaSzXHiVdswD9rKoVh9Ln4

The deps stage copied only package.json and pnpm-lock.yaml. pnpm 10+ reads
`overrides` from pnpm-workspace.yaml, and the lockfile records them, so a
frozen install without that file aborts:

  ERR_PNPM_LOCKFILE_CONFIG_MISMATCH
  Cannot proceed with the frozen installation. The current "overrides"
  configuration doesn't match the value found in the lockfile

Reproduced by mirroring the deps stage in a scratch directory with the exact
file set it copies: it fails as above with two files and completes with
pnpm-workspace.yaml added. Not caught earlier because CI and local builds
run against a full checkout, where the file is always present.

Also lands two pieces of local state main did not have:

- next-env.d.ts points at .next/dev/types, which is what `next dev` writes.
  Next rewrites this file per command — `next build` flips it back to
  .next/types — so it will keep showing as modified. CI is unaffected
  because `pnpm typecheck` runs `next typegen` first.
- .gitignore now excludes .claude/worktrees/, the scratch checkouts agent
  worktrees create. Scoped to that subdirectory so .claude/settings.json
  stays trackable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BaSzXHiVdswD9rKoVh9Ln4
@vercel

vercel Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
acklab Ready Ready Preview Aug 5, 2026 4:42am

Copilot AI lite review requested due to automatic review settings August 5, 2026 04:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes a Docker build failure in the deps stage by ensuring pnpm’s workspace-level overrides configuration is available during a frozen install, aligning the Docker install environment with what CI/local builds already have.

Changes:

  • Copy pnpm-workspace.yaml into the Docker deps stage so pnpm install --frozen-lockfile doesn’t fail with lockfile config mismatch.
  • Update next-env.d.ts to reference .next/dev/types route typings.
  • Ignore .claude/worktrees/ scratch checkouts in .gitignore.

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.

File Description
Dockerfile Ensures pnpm workspace config is present during the frozen install in the deps stage.
next-env.d.ts Adjusts generated Next.js type import paths to use .next/dev/types.
.gitignore Excludes agent scratch worktrees from git status/noise.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Picks up the Vercel standalone fix (#2) so this branch's preview deploy
builds against the corrected config.
@SupaOhm
SupaOhm merged commit 30ecb18 into main Aug 5, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 87dc7129 Deployed Aug 5, 2026 by vercel[bot]
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