Fix Windows npm install failure: bump @electron/rebuild to 4.2.0 - #505
Open
benlohlohloh wants to merge 1 commit into
Open
benlohlohloh wants to merge 1 commit into
benlohlohloh wants to merge 1 commit into
Conversation
The pinned ^3.7.0 pulled in a forked node-gyp (10.2.0-electron.1) that emits /LTCG:INCREMENTAL for the ClangCL toolset's librarian, which llvm-lib.exe doesn't support, breaking `npm install` on Windows when compiling native deps like better-sqlite3. Electron fixed this upstream in @electron/rebuild 4.2.0 by switching back to standard node-gyp ^12.2.0. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
🚫 This PR is missing its before/after evidenceEvery pull request here has to show its work. Screenshots or a short screen recording, before the change and after it.
How to fix it: edit the description, keep the A bug fix with no visible surface still needs it: show the failing behaviour, then the same steps passing. A terminal recording is fine. Genuinely nothing to show — a CI tweak, a typo, a dependency bump? A maintainer can apply the |
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.
This fixes
npm installfailing on Windows when building native modules (e.g.better-sqlite3).Problem
The pinned
@electron/rebuild@^3.7.0pulls in a forkednode-gyp(10.2.0-electron.1) that, when using the ClangCL toolset, generates a librarian invocation with/LTCG:INCREMENTAL.llvm-lib.exedoesn't understand that flag and fails with:This blocks
npm installfrom completing on a clean Windows machine with the Clang/LLVM MSVC toolset installed.Fix
Bump
@electron/rebuildto^4.2.0, which the Electron team already fixed by switching from the broken forkednode-gypback to the standardnode-gyp@^12.2.0package (see electron/electron#47613).Testing
package-lock.jsonvianpm install, the ClangCL/LTCG failure no longer occurs.🤖 Generated with Claude Code