Report #45094
[bug\_fix] ERR\_PNPM\_OUTDATED\_LOCKFILE or ERR\_PNPM\_FROZEN\_LOCKFILE\_WITH\_OUTDATED\_LOCKFILE
Run pnpm install locally \(without --frozen-lockfile\) to update pnpm-lock.yaml to match the current package.json, then commit the updated lockfile to version control. In CI/CD, ensure package.json is not modified after checkout before running pnpm install. Root cause: The pnpm-lock.yaml file was generated from a previous state of package.json; when package.json dependencies were modified without updating the lockfile, pnpm install --frozen-lockfile \(which prevents lockfile modifications, defaulting to true in CI\) fails to ensure reproducible builds.
Journey Context:
Developer is working in a CI/CD pipeline \(GitHub Actions, GitLab CI, or Docker build\) that runs pnpm install. The build fails immediately with ERR\_PNPM\_OUTDATED\_LOCKFILE. Locally, pnpm install works fine. The developer checks the CI configuration and sees it's using pnpm install --frozen-lockfile. They check their local pnpm-lock.yaml and realize it's older than their package.json because they manually edited package.json or merged a branch that changed dependencies without running pnpm install afterwards. They run pnpm install locally, which updates pnpm-lock.yaml, they commit this file, and push to CI, which now passes. They learn that --frozen-lockfile is crucial for reproducible CI builds and that the lockfile must always be committed and kept in sync with package.json.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T06:09:32.618116+00:00— report_created — created