Skip to content

fix(build): use VS2026-compatible node-gyp inside Electron Forge - #66

Merged
tiensonqin merged 1 commit into
masterfrom
codex/fix-windows-forge-rebuild
Nov 18, 2026
Merged

tiensonqin merged 1 commit into
masterfrom
codex/fix-windows-forge-rebuild

Conversation

@tiensonqin

@tiensonqin tiensonqin commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Windows dependency installation succeeds after #65, but Electron Forge's packaging step still invokes @electron/rebuild 3.x, which imports the old @electron/node-gyp fork directly. That copy ignores the npm CLI override and cannot recognize Visual Studio 2026.

Resolve @electron/node-gyp to upstream node-gyp 12.4.0 using a Yarn package alias, and regenerate the desktop lockfile. This updates the native tool inside Forge and other legacy rebuild consumers without changing their rebuild API or forcing a Forge major upgrade. The manifest source is resources/package.json, which is copied into static during compilation. The lockfile also removes dependencies used only by the obsolete fork.

Original failure: https://github.com/logseq/og/actions/runs/44323439346/job/134882390152

Validation:

  • Full Windows desktop build passed, including dependency installation, native module rebuild, Electron Forge packaging, Azure signing, and artifact upload: https://github.com/logseq/og/actions/runs/44331887584/job/134898189391
  • The Windows validation used the unchanged release job steps on windows-latest, reusing the compiled static artifact from the failed run and applying this PR's manifest and lockfile. The validation harness lives on a separate branch and is not part of this PR.
  • Fresh yarn install --frozen-lockfile --ignore-scripts passes and preserves the lockfile; verified Forge's worker resolves node-gyp 12.4.0.
  • Successfully compiled a native addon against Electron 43.4.1 through Forge's rebuild dependency on macOS.
  • Verified Visual Studio 2026 detection through Forge's actual node-gyp dependency.
  • git diff --check passes.

@tiensonqin
tiensonqin marked this pull request as ready for review November 18, 2026 15:08
@tiensonqin
tiensonqin merged commit 321a8c6 into master Nov 18, 2026
5 of 6 checks passed
@tiensonqin
tiensonqin deleted the codex/fix-windows-forge-rebuild branch November 18, 2026 15:20
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