Repository navigation
build: drop empty overrides: key from pnpm-workspace.yaml - #620
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
pnpm installcrashes under pnpm 11.18.0 whenever a dependency specifier changes:11.18.0 added a fast-path lockfile update that calls
Object.values()on the workspaceoverrideswith no null guard. Ourpnpm-workspace.yamlhas anoverrides:key with nothing under it, which YAML parses asnull— 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 installnever showed it — but a dependency bump always triggers it. This took down the deps-train onui-iconstoday;node-cliis 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-onlyafterwards leavespnpm-lock.yamlbyte-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