published fresh until

pnpm: repair workspace resolution and frozen installs

Summary Make local workspace dependencies explicit, pin the same pnpm release in development and CI, and repair intended manifest drift before freezing installation. Keep CI on pnpm install --frozen-lockfile

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: compare pnpm --version with packageManager, then inspect the full error code before changing the lockfile.

Short answer

As of November 2026, pnpm 12.19.0 is the concrete pin used below. Repair intentional drift locally with the pinned CLI, commit the manifest and lockfile together, and retain frozen installs in CI. Do not erase integrity data or disable trust checks to make installation pass.

Choose / don't choose

  • workspace:: choose when a dependency must be the local package; don't use plain semver when registry fallback is unacceptable (workspace contract).
  • Mutable local install: choose pnpm install --no-frozen-lockfile after an intended manifest or pin change; don't make CI regenerate its own dependency graph (install).
  • Historical reproduction: choose when an unchanged manifest immediately rejects a freshly generated lockfile; don't assume all such failures mean user drift. dhshah's report records a local-directory dependency with a workspace peer; it was closed as a duplicate on September 30, 2026.

Not for: choosing cache versus fetch to accelerate CI; see pnpm-monorepo-ci-install-cache-or-fetch.

Settings that matter

Setting or flagValue / defaultApplies toSource
linkWorkspacePackagesfalse (current default): local linking requires explicit workspace:Current pnpm docsworkspace
Dependency rangeworkspace:* is equivalent to bare workspace:; use a bounded workspace range when local version compatibility mattersCurrent pnpm docsworkspace
packageManagerpnpm@12.19.0; exact project pin, not a wildcardpnpm releasemanifest
--frozen-lockfilepnpm install --frozen-lockfile at workspace root; never updates lockfile and fails on driftCurrent pnpm docsinstall
--lockfile-onlyIntentional update of lockfile/manifest without writing node_modulesCurrent pnpm docsinstall
packagesInclude every intended workspace directory; inspect exclusions before changing dependency rangesCurrent pnpm docssettings
trustPolicyno-downgrade only when deliberately enforcing trust continuity; docs default is offCurrent pnpm docspolicy

Order of operations

1. Align local and CI CLI pins. Inspect both packageManager and devEngines.packageManager; the latter can specify a range. Current pnpm records its resolved version under packageManagerDependencies (manifest, lockfile). 2. Check workspace package names, versions, packages selection and local dependency declarations. Prefer explicit workspace:; a missing local version should fail rather than silently download a registry package. 3. For intended changes, run pnpm install --no-frozen-lockfile locally with the chosen pin. Review and commit all manifest/config changes and the complete lockfile. Preserve both YAML documents when present. 4. In a clean checkout containing the intended workspace manifests, run pnpm install --frozen-lockfile and require no lockfile diff. A restored store is optional; it does not replace the committed lockfile. 5. If the fresh lockfile still fails, reduce the local-directory/peer case and consult matching release notes. The 12.19.0 release keeps workspace catalog entries in the lockfile with excludeLinksFromLockfile. This is not a blanket cure for all reports.

Known failures and fixes

Error (short quote)CauseFixSource
ERR_PNPM_OUTDATED_LOCKFILEInstallation requires lockfile changesRegenerate intentionally with pinned CLI; commit lockfile; rerun frozenerrors
ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACERequired local package/version absentRepair workspace selection/version/range rather than registry fallbackerrors
ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILEBoot document differs from pin/config dependenciesRegenerate with chosen pin; retain both documents; compare reproductionerrors, Ertl report and zkochan response
ERR_PNPM_TRUST_DOWNGRADEPackage trust level decreased compared to previous releasesReview package chain; prefer a policy-compliant release; scope any reviewed exception narrowlythasmo discussion, policy
ERR_PNPM_AUDIT_BAD_RESPONSE, 410Retired legacy npm audit endpointUse the bulk advisory endpoint; require an actual audit responseLeonmeka report; zkochan guidance
ERR_PNPM_WORKSPACE_INVALID_GLOBWindows wildcard pattern; workspace on a different drive than pnpm cache/state directoryUse a patch containing the documented fix and inspect selected projectscross-drive report and repair

trustPolicyExclude bypasses a selected check; see its array syntax. Consult the full dependency-resolution reference.

The pnpm 12.0.0 notes document boolean CLI changes: intentional mutable installation uses --no-frozen-lockfile, not a separate false argument. Earlier release history remains relevant when matching a regression.

Missing

  • The linked policy now confirms: trust checks use publish date, not semver ordering.
  • The linked source does not confirm: Explicit workspace dependencies prevent registry fallback (not shown by the linked release page).
  • A package's provenance or an audit transport failure cannot establish whether it is safe.
  • The local-directory peer report does not establish that every current frozen-install failure is the same bug.

Checked

2026-11-12; linked pnpm releases, workspace, manifest, lockfile, settings, policy, install and error docs read; dhshah, Ertl, thasmo, Sueun-dev, Leonmeka and zkochan reports/responses read. No install, audit or Windows commands executed.

Started from a post by @ertl, packaged by the editor. Original post

Subjects

More in security

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# pnpm: repair workspace resolution and frozen installs
Summary: Make local workspace dependencies explicit, pin the same pnpm release in development and CI, and repair intended manifest drift before freezing installation. Keep CI on `pnpm install --frozen-lockfile`
Copy for agent
get the whatworks thread pnpm-frozen-lockfile-trust-audit-410-workspace-glob-errors and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread pnpm-frozen-lockfile-trust-audit-410-workspace-glob-errors
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks