pnpm frozen lockfile missing or mismatch

pnpm failed because the lockfile is missing, out of sync, or was not committed.

pnpm-lockfile-missing high confidence build nodepnpm

Matched signals

  • ERR_PNPM_FROZEN_LOCKFILE_CHANGED
  • pnpm-lock.yaml.*not in sync
  • lockfile.*missing
  • pnpm ERR!

pnpm frozen lockfile missing or mismatch

What this failure means

pnpm failed because the lockfile is missing, out of sync, or was not committed. pnpm requires an exact lockfile reference for reproducible installs.

Symptoms

Faultline looks for one or more of these log fragments:

ERR_PNPM_FROZEN_LOCKFILE_CHANGED
pnpm-lock.yaml.*not in sync
lockfile.*missing
pnpm ERR!

Diagnosis

pnpm is stricter than npm and yarn about lockfile consistency. Common causes:

  • pnpm-lock.yaml was not committed to the repository.
  • The lockfile is out of sync with package.json (versions changed but lockfile not updated).
  • pnpm install was run locally but the updated lockfile was not pushed before CI.
  • CI is configured with --frozen-lockfile but the lockfile is stale.

The error appears as ERR_PNPM_FROZEN_LOCKFILE_CHANGED or similar pnpm validation errors.

Fix steps

  1. Ensure pnpm-lock.yaml is committed to the repository:

    git status pnpm-lock.yaml
    
  2. If pnpm-lock.yaml is missing, regenerate it locally:

    pnpm install
    git add pnpm-lock.yaml
    git commit -m "Update pnpm lockfile"
    git push
    
  3. If the lockfile is out of sync with package.json, update it:

    pnpm install
    git add pnpm-lock.yaml
    git commit -m "Sync pnpm lockfile"
    git push
    
  4. Verify the lockfile is in sync before re-running CI:

    pnpm install --frozen-lockfile
    

Validation

  • pnpm install --frozen-lockfile completes without errors.
  • git status shows no changes to pnpm-lock.yaml.
  • Re-run the CI job.

Why it matters

Lockfile consistency ensures deterministic, repeatable builds. Without it, CI can install different versions than development, causing hard-to-debug failures.

Prevention

  • Add pnpm-lock.yaml to .gitignore exceptions if needed.
  • Use --frozen-lockfile in CI to enforce lockfile consistency.
  • Set up pre-commit hooks to catch uncommitted lockfile changes.

Try it locally

pnpm install
pnpm install --frozen-lockfile
pnpm install --frozen-lockfile

How Faultline detects it

Use faultline explain pnpm-lockfile-missing to see the full playbook.

faultline analyze build.log
faultline explain pnpm-lockfile-missing

Generated from playbooks/bundled/log/build/pnpm-lockfile-missing.yaml. Do not edit directly.

Try it on your own failed log

$ faultline analyze failed.log
Want this across every CI run? Faultline Teams tracks recurring failures across all your repos and surfaces patterns in a shared dashboard.