Skip to content

fix(docker): specify pnpm@9 to match lockfile version#22

Merged
GMNAPI merged 2 commits into
mainfrom
fix/pnpm-9-dockerfile
Feb 7, 2026
Merged

fix(docker): specify pnpm@9 to match lockfile version#22
GMNAPI merged 2 commits into
mainfrom
fix/pnpm-9-dockerfile

Conversation

@GMNAPI

@GMNAPI GMNAPI commented Feb 7, 2026

Copy link
Copy Markdown
Owner

Problem

Railway deployment failing with:

ERR_PNPM_LOCKFILE_BREAKING_CHANGE  Lockfile /app/pnpm-lock.yaml not compatible with current pnpm

Root Cause

  • pnpm-lock.yaml uses lockfileVersion: '9.0' (requires pnpm 9.x)
  • Dockerfile runs npm install -g pnpm without version specification
  • Railway installs whatever latest/default pnpm is available (could be 8.x or 10.x)
  • Version mismatch → lockfile incompatible → build fails

Solution

Explicitly specify pnpm@9 in both Dockerfile stages:

# Before
RUN npm install -g pnpm

# After  
RUN npm install -g pnpm@9

This ensures the pnpm version matches the lockfile version requirement.

Testing

After merge, Railway should successfully:

  1. Install pnpm 9.x
  2. Read pnpm-lock.yaml without errors
  3. Install dependencies
  4. Deploy successfully

Related

🤖 Generated with Claude Code

Railway deployment was failing with:
ERR_PNPM_LOCKFILE_BREAKING_CHANGE Lockfile not compatible with current pnpm

Root cause: pnpm-lock.yaml uses lockfileVersion '9.0' but Dockerfile
installed latest pnpm (unspecified version) which could be 8.x or 10.x.

Solution: Explicitly install pnpm@9 in both build stages to match the
lockfile version requirement.
Resolved conflict by keeping pnpm@9 specification (this branch)
Also removed duplicate CMD line.
@GMNAPI GMNAPI merged commit 9f23783 into main Feb 7, 2026
@GMNAPI GMNAPI deleted the fix/pnpm-9-dockerfile branch February 7, 2026 23:20
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