Repository navigation
Fix pnpm install failures on Node 22.12+ via prebuild-install 7.1.3 override (fixes #1360) - #1361
Merged
Merged
Conversation
✅ Deploy Preview for tourmaline-kringle-c98715 canceled.
|
|
Size Change: 0 B Total Size: 490 kB ℹ️ View Unchanged
|
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.
Summary
pnpm installfails on Node 22.12+ becauseprebuild-install@7.1.2(pulled in bysqlite3andsharp's install scripts) computes its prebuilt-binary download URL with a string comparison againstprocess.versions.napi. On any Node with a two-digit N-API version (22.12+ reports N-API 10), the comparison misfires ('6' <= '10'is false), the URL is bogus, the download 404s, and the install script falls back to compiling from source withnode-gyp— which fails on machines without a C++ toolchain. That's the exact error trace in the reporter's screenshots.This adds a root
overridesentry pinningprebuild-installto7.1.3, whose only change is thenapi-build-utils1→2 bump (numeric comparison), fixing both thesqlite3andsharppostinstalls at once.Changes
package.json:"overrides": { "graphql": "16.8.1", "prebuild-install": "7.1.3" }Pending before merge
pnpm-lock.yamlis not yet updated in this PR. The regenerated lockfile is verified locally (44 insertions / 15 deletions, scoped to the prebuild-install subtree;pnpm install --frozen-lockfilepasses; fullpnpm installon Node 24 completessqlite3's postinstall via prebuilt binary with no node-gyp fallback), but it is ~1MB and could not be pushed through the API from the sandbox used to prepare this PR. It must land before merge: without it, pnpm considers the lockfile "up to date" and the override never takes effect.Verification (local)
prebuild-install -r napiwarnsThis package does not support N-API version undefined, requests a bogusnapi-v137URL, 404s.sqlite3smoke test (in-memory DB roundtrip) passes.npm installfails identically.