Skip to content

build: drop empty overrides: key from pnpm-workspace.yaml - #620

Merged
aversini merged 1 commit into
mainfrom
fix/pnpm-1118-empty-overrides
Jul 29, 2026
Merged

aversini merged 1 commit into
mainfrom
fix/pnpm-1118-empty-overrides

Conversation

@aversini

Copy link
Copy Markdown
Collaborator

Why

pnpm install crashes under pnpm 11.18.0 whenever a dependency specifier changes:

[ERROR] Cannot convert undefined or null to object
    at Object.values (<anonymous>)
    at _install (pnpm.mjs:193087:43)

11.18.0 added a fast-path lockfile update that calls Object.values() on the workspace overrides with no null guard. Our pnpm-workspace.yaml has an overrides: key with nothing under it, which YAML parses as null — that beats pnpm's {} default and throws. The code does not exist in 11.17.0, so this is a 11.18.0 regression.

The fast path only runs when specifiers changed, which is why a plain pnpm install never showed it — but a dependency bump always triggers it. This took down the deps-train on ui-icons today; node-cli is the same shape and would fail the same way the moment it moves to 11.18.0.

What

Delete the empty overrides: key. It held no entries, so this is a no-op for resolution — pnpm install --lockfile-only afterwards leaves pnpm-lock.yaml byte-identical.

Verified by reproducing on 11.18.0 with the key present (crashes, same line) and absent (installs clean).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Pm4oPDceHFw3DN6MQG8wbz

pnpm 11.18.0 crashes on it. Its new fast-path lockfile update calls
Object.values() on the workspace overrides without a null guard, and an
empty YAML key parses as null rather than falling back to `{}`:

    [ERROR] Cannot convert undefined or null to object
        at Object.values (<anonymous>)
        at _install (pnpm.mjs:193087:43)

The fast path only runs when specifiers changed, so a plain install never
hits it — but a dependency bump always does. The key held no entries, so
removing it is a no-op for resolution (lockfile is byte-identical after).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pm4oPDceHFw3DN6MQG8wbz
@aversini
aversini merged commit ab7f626 into main Jul 29, 2026
5 checks passed
@aversini
aversini deleted the fix/pnpm-1118-empty-overrides branch July 29, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant