Skip to content

fix(ci): isolate Windows node-gyp setup - #65

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

tiensonqin merged 1 commit into
masterfrom
codex/fix-windows-node-gyp

Conversation

@tiensonqin

Copy link
Copy Markdown
Contributor

The Windows desktop build fails during dependency installation because upgrading node-gyp inside npm's own package triggers a registry 404 for @npmcli/docs. The setup step then continues with npm's bundled node-gyp 11.5.0, which cannot detect Visual Studio 2026. Native builds also select the runner's Python 3.15 instead of the configured Python 3.11.

Install node-gyp 12.4.0 in a separate directory under RUNNER_TEMP, export npm_config_node_gyp so Yarn's npm shim uses it, and set NODE_GYP_FORCE_PYTHON to the Python 3.11 installation. Exit immediately if installation or the version check fails.

Fixes the failure in https://github.com/logseq/og/actions/runs/44297266409/job/134781127733.

Validation:

  • Windows job passes actionlint; the complete workflow has no new diagnostics compared with master.
  • A real isolated npm install and Yarn lifecycle script select node-gyp 12.4.0.
  • Confirmed node-gyp recognizes VS2026 and honors forced Python selection.
  • Executed the PowerShell setup with mocked commands, checking exported paths (including spaces), successful setup, and propagation of npm/version-check failures.
  • git diff --check passes.

Full Windows packaging still requires a CI run.

@tiensonqin
tiensonqin merged commit ecd596c into master Nov 18, 2026
5 of 6 checks passed
@tiensonqin
tiensonqin deleted the codex/fix-windows-node-gyp branch November 18, 2026 14:21
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