Skip to content
Nilay Kabariya

Entry No.112·Tested··4 min read

pnpm 12 breaking changes, tested: the errors pnpm 11 didn't give

pnpm 12 is now npm's latest. I ran pnpm 11.28.13 and 12.21.0 side by side: 4 commands that passed on 11 fail on 12, one silent change, and the fix for each.

Verdict

Four commands that exited 0 on pnpm 11.28.13 failed on 12.21.0: a misspelled setting in a pinned project (ERR_PNPM_UNRECOGNIZED_WORKSPACE_SETTINGS), --frozen-lockfile false, --resolution-only, and sudo pnpm add -g (ERR_PNPM_SUDO_NOT_SUPPORTED). pnpm add yarn now changes packageManager instead of adding a dependency. Each of the four errors has a one-line fix; for the yarn change, pnpm documents a one-line specifier (`pnpm add yarn@npm:yarn@1.22.22`) that was not run.

Tested on

pnpm
11.28.13 and 12.21.0
Node
24.22.3
OS
GitHub Actions ubuntu-latest, November 23, 2026

npm install -g pnpm now gives you pnpm 12: on November 23, 2026 the registry’s latest tag was 12.21.0, and pnpm 11 had moved to latest-11 (11.28.13). pnpm’s own What’s different in pnpm 12 still says latest points at the 11 line, so a CI job that installs pnpm without a version may have switched without anyone choosing it.

pnpm 12 is a rewrite in Rust, and its page lists eight differences from pnpm 11. I ran each one I could test with pnpm 11.28.13 and then 12.21.0, in a fresh folder each time, and kept the exit codes.

What you ran pnpm 11.28.13 pnpm 12.21.0 Fix
a misspelled key in pnpm-workspace.yaml, packageManager pinned to the running pnpm warning, exit 0 ERR_PNPM_UNRECOGNIZED_WORKSPACE_SETTINGS, exit 1 fix the spelling it suggests, or remove the key
pnpm install --frozen-lockfile false exit 0 unexpected argument '--frozen-lockfile' found, exit 2 --no-frozen-lockfile (or --frozen-lockfile=false)
pnpm install --resolution-only exit 0 unexpected argument '--resolution-only' found, exit 2 pnpm peers check
sudo pnpm add -g ... a warning, then installed, exit 0 ERR_PNPM_SUDO_NOT_SUPPORTED, exit 1 run it without sudo
pnpm add yarn added the yarn 1.22.22 package to dependencies (then ERR_PNPM_IGNORED_BUILDS, exit 1) set "packageManager": "yarn@4.19.0", no dependency added pnpm add yarn@npm:yarn@1.22.22 if you want the package (not run)

1. ERR_PNPM_UNRECOGNIZED_WORKSPACE_SETTINGS

A typo in pnpm-workspace.yaml (here minimumReleaseAgee: 1440 instead of minimumReleaseAge) gave both versions the same warning when the project didn’t pin pnpm, and both installed with exit 0:

[WARN] The following settings in pnpm-workspace.yaml are not recognized by this version of pnpm and were ignored: "minimumReleaseAgee" (did you mean "minimumReleaseAge"?).

Add "packageManager": "pnpm@12.21.0" to package.json, run pnpm 12.21.0, and the warning becomes a failure:

Error: ERR_PNPM_UNRECOGNIZED_WORKSPACE_SETTINGS
  × The following settings in pnpm-workspace.yaml are not recognized by this
  │ version of pnpm: "minimumReleaseAgee" (did you mean "minimumReleaseAge"?).
  help: The project pins pnpm to a version the running pnpm satisfies, so
        these settings cannot be meant for a different pnpm version. Remove
        them from pnpm-workspace.yaml or fix their spelling.

With the same pin to its own version, pnpm 11.28.13 only warned. The pin is what turns it into an error: pnpm 12 reasons that a setting it doesn’t know can’t be meant for another pnpm version when the project asks for this one.

Use the name in the did you mean part, or delete the line. A key that was never valid was also never applied, on pnpm 11 too, so the typo was already costing you the setting.

2. –frozen-lockfile false

$ pnpm install --frozen-lockfile false
error: unexpected argument '--frozen-lockfile' found
  tip: to pass '--frozen-lockfile' as a value, use '-- --frozen-lockfile'
Usage: pnpm add [OPTIONS] <PACKAGE_NAMES>...

That’s pnpm 12.21.0, exit code 2. pnpm 11.28.13 accepted the same command (exit 0). The flag no longer takes a separate true or false; note the usage line is for pnpm add, not pnpm install. package.json was not changed.

pnpm install --no-frozen-lockfile

3. –resolution-only

$ pnpm install --resolution-only
error: unexpected argument '--resolution-only' found
  tip: a similar argument exists: '--production'

pnpm 12.21.0 exited 2; pnpm 11.28.13 exited 0. The --production tip is not a replacement: the flag was used to print peer dependency issues, and pnpm’s page names pnpm peers check for that.

pnpm peers check

4. ERR_PNPM_SUDO_NOT_SUPPORTED

pnpm 11.28.13 already warns (“Running “pnpm add –global” with sudo is not supported and will fail in pnpm v12”), then installs. pnpm 12.21.0 stops:

Error: ERR_PNPM_SUDO_NOT_SUPPORTED
  × Running "pnpm add --global" with sudo is not supported
  help: pnpm installs global packages and writes global configuration inside
        your home directory, so they do not require root permissions, and
        running this command as root would target the root user's home
        directory instead of yours. Rerun the command without sudo.

Drop sudo: pnpm add -g <package>. Global packages go under your own home directory. The message also says how to manage root’s own global packages on purpose (run pnpm with SUDO_USER unset, for example sudo env -u SUDO_USER pnpm ...); that was not run here. pnpm’s release notes list pnpm setup and pnpm self-update under the same rule; only pnpm add -g was run.

5. pnpm add yarn changes your package manager

No error here, which is the problem. On pnpm 12.21.0:

$ pnpm add yarn
Recorded yarn@4.19.0 as the project's package manager

package.json got "packageManager": "yarn@4.19.0" and no dependencies entry. On pnpm 11.28.13 the same command added "yarn": "^1.22.22" to dependencies (and then stopped at ERR_PNPM_IGNORED_BUILDS for yarn’s build script, see ERR_PNPM_IGNORED_BUILDS and allowBuilds). pnpm 12 can install other package managers, so yarn now means the tool.

If a script adds yarn as a package, the project’s packageManager field now names Yarn. What other pnpm commands do in a project with that field was not tested. pnpm’s page says a specifier that names the package, such as pnpm add yarn@npm:yarn@1.22.22, still installs the npm package; that form was not run.

What didn’t change in this test

For npm’s own major version, see npm 12 breaking changes, tested.

How this was tested

GitHub Actions ubuntu-latest, November 23, 2026, Node 24.22.3. Each case ran in a fresh folder with npx -y pnpm@11.28.13, then npx -y pnpm@12.21.0. Public npm packages (is-number, yarn), one public GitHub repository and two local tarballs only; no tokens or accounts. Not tested: Windows and macOS, the global shims and package-manager pinning beyond pnpm add yarn, lockfile changes for cyclic dependency graphs, and packageImportMethod on btrfs. The script and the full output are in nk-repro/pnpm-12, run 45111198674.

— N.K., end of entry No.112

Useful? Pass it on:Post on XFollow @EmotionalMatter

Related entries

  1. No.105

    ERR_PNPM_IGNORED_BUILDS: onlyBuiltDependencies no longer works

    pnpm 11 and 12 fail installs with ERR_PNPM_IGNORED_BUILDS and ignore onlyBuiltDependencies. pnpm 10, 11 and 12 tested: the allowBuilds setting that passes.

    > Error: ERR_PNPM_IGNORED_BUILDS

    FIXED4 min
  2. No.092

    TypeScript 7.1 beta tested: ts-jest, ESLint, NestJS, Angular

    On TypeScript 7.1.0-beta, ts-jest, typescript-eslint, ts-node and TypeDoc failed exactly as on 7.0, and so did NestJS, Angular, vue-tsc, svelte-check and astro check. The beta does ship a compiler API, but at new entry points (typescript/sync and typescript/async) that no tool uses yet. The side-by-side setup with TypeScript 6 fixed every one I re-ran.

    TESTED4 min
  3. No.057

    Node 26 vs Node 24: what breaks when you upgrade, tested

    Most projects move over cleanly: jsonwebtoken, bcrypt, sharp, better-sqlite3 13, tsx and Vitest all worked unchanged. What broke: Corepack and Yarn are gone (Docker builds fail with exit code 127), native modules installed under Node 24 refuse to load, fs.rmdir with recursive now throws (prisma generate with zod-prisma-types fails on the second run), and fs.W_OK disappeared without an error.

    TESTED8 minWindows

tip: paste the exact error text