Repository navigation
fix(patchy): a failed install on pnpm 12 says why - #561
Merged
Merged
Conversation
Merged
allisonmahmood
force-pushed
the
fix/patchy-pnpm12-install-errors
branch
from
October 6, 2026 21:52
3615d56 to
64b18b4
Compare
pnpm 12 reports a failed install as `× installing dependencies` followed by its causes, wrapped across lines, often with no ERR_PNPM_ code. The CLI relayed only that first line, so init and refresh failures on pnpm 12 gave no reason. The relay now rejoins pnpm 12's causes, after its code when there is one, and still redacts every URL; a wrap inside a URL is closed up first so a query can't slip past the redaction. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Rejoining pnpm 12's wrapped diagnostic could not be made safe: a wrap inside the URL scheme hid the URL from redaction. NO_GRAPHICS makes pnpm 12 print one `Caused by:` line per cause and its code on its own line, and pnpm 11 ignores it. The relay reads those lines, takes the code only from the code line, and redacts URLs with any scheme case or path characters. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A URL in a relayed pnpm error now runs to the next ASCII whitespace, so a raw quote or non-breaking space in its path no longer leaves its query behind, and credentials are stripped through the last `@` before the path. Causes are read only from pnpm 12's narrated report, so a pnpm 11 message that happens to contain `Caused by:` relays as before. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
allisonmahmood
force-pushed
the
fix/patchy-pnpm12-install-errors
branch
from
October 7, 2026 00:34
64b18b4 to
71da1fa
Compare
allisonmahmood
added a commit
that referenced
this pull request
Oct 7, 2026
The repo pins pnpm 11.28.3 (packageManager, engines, mise), while pnpm 12 has been the stable line since August; `latest` is 12.9.1. This moves all three pins and the server image build docs to 12.9.1. Most of 12.0's breaking changes don't touch this workspace: no git dependencies, no `--frozen-lockfile false`, and pnpm 12's stricter `pnpm-workspace.yaml` validation accepts every setting we use. Two did: - **The lockfile.** When pnpm manages its own version, pnpm 12 writes itself into a new first lockfile document, and GitHub's dependency graph still reads only that first document ([dependabot/dependabot-core#15904](dependabot/dependabot-core#15904), open). On this repo that would show zero dependencies, close the open security alerts and let `dependency-review` pass blind. `pmOnFail: ignore` stops pnpm switching versions itself, so the lockfile stays byte-identical to pnpm 11's. mise, CI (`pnpm/action-setup`) and corepack already install the `packageManager` version, and `engines.pnpm` still refuses pnpm 11. - **The image deploy.** pnpm 12 fails `deploy --prod` when a workspace patch goes unused. Our one patch (`async-exit-hook`) fixes a test dependency, so the image build's production deploy passes `allow-unused-patches`; regular installs keep the check. - **The CLI's offline test registry.** It packs installed packages with `tar`, and pnpm 12 hard-links identical store files to one inode, so three of TypeScript's identical lib files went in as hard-link entries, which pnpm 12 drops on install. That broke the tier 1 starter's typecheck in the CLI tests. Real registry tarballs never carry hard links; the fixture now passes `--hard-dereference`. The CLI-driven patch repo installs in CI now run on pnpm 12, the version a new user installs today. That surfaced a real CLI bug for pnpm 12 users, fixed separately in #561: a failed install said only `× installing dependencies`. That fix landed first, as #561. Patch repos are unaffected: they use whatever pnpm the user has. Made by Claude Opus 5.5 via Claude Code in T3 Code; reviewed by GPT 6.1 Sol via codex. --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
allisonmahmood
added a commit
that referenced
this pull request
Oct 7, 2026
What's new for this deploy, release 7 (`b765183..48704b0`). - Fixed: **A patch that fails to set up says why** (#561) - Behind the scenes: the libraries Patchy is built on are up to date (#558) - Behind the scenes: Patchy builds with the newest version of its package manager (#560) - No line: Dependabot's workerd ignore (#557) is tooling churn The range also holds #573, release 6's own What's new entry, left out as usual. Made by Claude Opus 5.5 via Claude Code in T3 Code. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.
When
patchy initorrefreshcan't install dependencies on pnpm 12, the CLI says onlypnpm: Error: × installing dependencies. pnpm 12 is whatnpm i -g pnpminstalls today, so new users and their agents get no reason. pnpm 12's default output puts the reason in a chain of causes after that first line, wrapped at about 80 columns and often without anERR_PNPM_code, and the CLI relays only the first line.The CLI now runs
pnpm installwithNO_GRAPHICS=1. pnpm 12 then prints one unwrappedCaused by:line per cause and puts its code on adiagnostic code:line; pnpm 11 ignores the variable.installFailureReasonrelays the code and the causes, for examplepnpm: Failed to resolve dependency tree: Failed to resolve dependency: Tarball server returned HTTP 404 for http://…/patchy-0.0.1.tgz. pnpm 11 output is relayed as before.Each part is still redacted. Rejoining the wrapped default output can't be made safe: a wrap inside a URL's scheme hides the URL from redaction. The unwrapped output avoids that. Redaction also closes older gaps: a URL now runs to the next ASCII whitespace, so an uppercase scheme or a quote or non-breaking space in its path no longer leaks the query, and a password containing
@is stripped in full. The one visible change for pnpm 11: a quoted URL with a query loses its closing quote.Found while moving the repo to pnpm 12 (#560), whose CI runs the CLI's installs on pnpm 12. The refresh-failure test passes on both pnpm 11 and 12 locally.
Made by Claude Opus 5.5 via Claude Code in T3 Code; reviewed by GPT 6.1 Sol via codex.