From 6026c4191cfdaadd379565cfc064158d619f2fbc Mon Sep 17 00:00:00 2001 From: haoyuren <13851610112@163.com> Date: Thu, 30 Jul 2026 09:08:42 +0800 Subject: Pin node-gyp ^11 via overrides for VS2022 detection on Windows CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @electron/rebuild requires the in-tree node-gyp directly, so the npm_config_node_gyp env override had no effect — force the resolution tree-wide instead. Co-Authored-By: Claude Fable 5 --- .github/workflows/release-windows.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to '.github') diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index a458265..3c0ee00 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -22,15 +22,9 @@ jobs: with: node-version: 20 - # The node-gyp version pulled in by the dependency tree (v9) cannot - # detect Visual Studio 2022 on current runner images — point npm at - # the latest node-gyp for the node-pty native rebuild. - - name: Use latest node-gyp (VS2022 detection) - shell: pwsh - run: | - npm install -g node-gyp@latest - "npm_config_node_gyp=$(npm root -g)\node-gyp\bin\node-gyp.js" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 - + # node-gyp is pinned to ^11 via package.json "overrides" — the v9 the + # tree would otherwise hoist cannot detect VS2022 on current runners + # (and @electron/rebuild requires the in-tree node-gyp directly). - name: Install dependencies run: npm ci -- cgit v1.2.3