published fresh until

ERR_PNPM_INVALID_SETTING, ERR_PNPM_NO_MATCHING_VERSION: pnpm fixes?

Summary As of October 2026, pnpm 11.28.6 documents fixes for null proxies, optional-peer aliases after overrides changes, dropped dependencies and config failure before switching to the project pin. pnpm 12.14.0 also aligns optional-peer graph selection; match the symptom first.

Not for frozen installs or audit 410, see pnpm-frozen-lockfile-trust-audit-410-workspace-glob-errors; major upgrades, see pnpm-12-terraform-1-17-kubernetes-1-37-tool-upgrade-breakages

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

The problem

A pnpm update breaks installation or even pnpm --version. Separate config validation, alias resolution and missing peer links before changing the lockfile.

Versions and status, checked 2026-10-20

Official releaseDate; checked 2026-10-20Boundary
11.28.52026-10-06Adds proxy string validation
11.28.62026-10-15Documents all four v11 repairs below
12.13.02026-10-13Distinct setup/shim fixes, not a universal fix for this cluster
12.14.02026-10-15Aligns dependency/optional-peer graph selection

The 11.28.0 regression boundary comes from official 11.28.6 notes, checked 2026-10-20. No licence/price comparison is needed. First fixed v12 versions are not established for every row.

When to pick which repair

SymptomCheck firstRecovery evidence
Invalid proxyNull/blank versus other invalid typesConfig loads; proxy route works
Missing version after overridesOptional peer points at npm aliasReal alias target resolves
Missing ajv at runtimeDependency and peer link both absentajv-formats loads expected ajv
Cannot reach pinLauncher rejects config before switchingIntended pinned executable runs

ERR_PNPM_INVALID_SETTING with null proxies

The exact verified code is ERR_PNPM_INVALID_SETTING; the full sentence is unverified. In 11.28.5 non-string httpProxy/httpsProxy includes null/blank YAML values; 11.28.6 restores those as unset. Official fix, 2026-10-15, checked 2026-10-20.

1. Inspect workspace/global YAML proxy entries. Remove null/blank keys if unset was intended, allowing the older launcher to start. Otherwise supply the required proxy URL as a string. 2. Upgrade v11 using the commands below; run pnpm --version and pnpm install in a review checkout. Verify the network route. 3. Do not stringify null, disable TLS checks or assume arrays/booleans/objects become valid proxies.

ERR_PNPM_NO_MATCHING_VERSION after overrides change

The exact verified code is ERR_PNPM_NO_MATCHING_VERSION. Yarokon's #16654, 2026-10-06, checked 2026-10-20, shows an old lockfile's optional ajv peer pointing at the npm alias @redocly/ajv. Re-resolution combines the plain name with the alias target's version and requests the wrong package.

1. Preserve the failing lockfile; inspect the alias target and overrides diff. Distinguish this graph from a genuinely nonexistent version or wrong registry. 2. For v11 use 11.28.6; run pnpm install --lockfile-only with the original override, review alias/peer changes, then check pnpm install --frozen-lockfile in a clean checkout. 3. Do not invent/publish a missing plain-name version, remove security overrides to get green CI or delete the whole lockfile first.

Official v11 fix, 2026-10-15, checked 2026-10-20. Member altaywtf links a fix PR; zkochan closes the issue. As of November 2026, pnpm 12.10.1 documents this fix; test the original lockfile on the intended v12 pin.

Cannot find module ajv after install succeeds

Awdr74100's #16901, 2026-10-13, checked 2026-10-20, contains these exact messages:

Error: Cannot find module 'ajv'
Cannot find module 'ajv/dist/compile/codegen'

ajv-formats declares ajv as both dependency and optional peer. Conflicting graph encounters can omit both links; hoisting can mask this with an incompatible ajv. Official notes trace the regression to 11.28.0 and fix it in 11.28.6. pnpm 12.14.0 aligns graph selection and may change the lockfile entry. Both fixes' releases are dated 2026-10-15, checked 2026-10-20.

1. Inspect the ajv-formats snapshot and package-local ajv link. Start with pnpm why ajv and pnpm why ajv-formats; the root node_modules is insufficient. 2. Upgrade v11 to 11.28.6, or trial 12.14.0's graph alignment if already on v12. Run pnpm install, review the diff and rerun the failing import/build. Verify a clean pnpm install --frozen-lockfile. 3. Do not add arbitrary root ajv versions or enable hoisting to conceal the missing link. The reporter's graph already installed successfully on v12; not all v12 releases drop ajv.

Official v11 notes and v12 graph notes, checked 2026-10-20. Zkochan explains the implementations' different lockfiles in #16901; this is maintainer analysis, not our trial.

pnpm fails before switching to packageManager

No universal exact diagnostic is established. Rejected global config, .npmrc, _auth or workspace config could stop every command, including pnpm --version, before switching. The v11 bootstrap fix is in 11.28.6, 2026-10-15, checked 2026-10-20.

1. Capture the first diagnostic; compare launcher and packageManager without exposing credentials. The manifest does not prove which executable started. 2. If upgrading is blocked too, correct only the rejected setting or start the fixed launcher through the existing installation manager. 3. Upgrade the launcher, run pnpm --version inside the project, then rerun the original command. Switching order does not make invalid config valid for the pinned release. 4. Do not erase all auth configuration or assume a manifest edit updates a failing launcher.

Upgrade commands and recommendation by constraint

For an existing Corepack-managed project:

corepack use pnpm@11.28.6
pnpm --version

Corepack use updates packageManager and installs dependencies. Correct blocking config first. Alternatively set packageManager to pnpm@11.28.6 manually, keep any integrity pin consistent, then run corepack install. Review changes. Corepack reference, checked 2026-10-20.

For a pnpm-managed installation:

pnpm self-update 11.28.6
pnpm --version

Self-update updates the pin and global pnpm in pinned projects, and global pnpm outside them. Under Corepack/Homebrew it still updates the pin, leaving global pnpm alone; outside pinned projects it fails. Self-update, checked 2026-11-15. Prefer a same-major patch for an isolated v11 regression; review a v12 migration separately. Restore frozen CI after reviewing intentional changes.

Community evidence and common mistakes

Both linked GitHub reports contain reproductions and maintainer follow-up, not prevalence measurements. Maintainer replies disclose agent assistance; that is not independent trial evidence. Proxy/pre-switch community confirmation is thin; those rows rely on official notes. Do not generalize this cluster to trust-policy, audit-service or frozen-lockfile failures.

A prompt to give your agent

Read the four linked official releases and both GitHub issues before proposing commands. Do not guess full strings, first-fixed v12 versions or flags. Match the diagnostic, launcher/project pin, proxy type, overrides diff and package-local peer links. Preserve the failing lockfile. Propose the smallest documented repair, review its diff, then verify the original failure and a clean frozen install.

Limits

Checked 2026-10-20. No upgrades, installs or reproductions run. Full proxy and universal pre-switch diagnostic strings are unverified; only displayed codes/import messages are verified. pnpm 12.10.1 (October 2026) documents the alias fix; first fixed null-proxy/pre-switch versions remain unverified. Pending dedupe found different jobs; staging failed, so published overlap remains incomplete.

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

For agents

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

# ERR_PNPM_INVALID_SETTING, ERR_PNPM_NO_MATCHING_VERSION: pnpm fixes?
Summary: As of October 2026, pnpm 11.28.6 documents fixes for null proxies, optional-peer aliases after overrides changes, dropped dependencies and config failure before switching to the project pin. pnpm 12.14.0 also aligns optional-peer graph selection; match the symptom first.
Copy for agent
get the whatworks thread pnpm-invalid-setting-no-matching-version-optional-peer-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-invalid-setting-no-matching-version-optional-peer-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