Skip to content

fix(ci): install VS 2022 Build Tools for Node 22 on windows-arm64 - #222

Merged
robertsLando merged 1 commit into
mainfrom
fix/windows-arm64-node22-vs2022
Oct 22, 2026
Merged

robertsLando merged 1 commit into
mainfrom
fix/windows-arm64-node22-vs2022

Conversation

@robertsLando

@robertsLando robertsLando commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Problem

windows-arm64 (22) fails every time (example):

Looking for Visual Studio 2022
Failed to find a suitable Visual Studio installation.

The windows-11-arm label now uses the windows-11-vs2026-arm64 image, which has only VS 2026 (actions/runner-images#14602, finished Sept 30). Node 22's vcbuild.bat only looks for VS 2022 ([17.6,18.0)). Node 24 and 26 also look for VS 2026, so they still pass. No hosted arm64 Windows image with VS 2022 is left.

Fix

For the arm64 + Node 22 job only, install VS 2022 Build Tools with the VC tools workload, ARM64 compilers and ARM64 ATL. Node 22's vswhere query uses -products *, so it finds a Build Tools install.

Considered instead:

  • Patch vcbuild.bat to accept VS 2026 (port of build: add support for Visual Studio 2026 nodejs/node#60727, ~30 lines). Node 22's gyp already supports VS 2026, so this would be enough to find the compiler. But upstream keeps v22 on VS 2022 on purpose (the VS 2026 tooling/doc PRs are dont-land-on-v22.x), so Node 22 is never built with MSVC 18 and its older V8 may not compile with it. It would also add a hunk to carry into every new v22 patch, and our binary would use a different compiler than the official release.
  • Switch to a different runner label. None exists: the VS 2022 arm64 image is gone.

Test

Windows workflow run on this branch: https://github.com/yao-pkg/pkg-fetch/actions/runs/39779279895

The windows-11-arm runner label moved to the VS 2026 image
(actions/runner-images#14602). Node 22's vcbuild.bat only looks for
VS 2022, so the arm64 Node 22 build fails with
"Failed to find a suitable Visual Studio installation".
Copilot AI balanced review requested due to automatic review settings October 22, 2026 12:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The linked validation job is still installing Build Tools, so successful installation and subsequent Node 22 ARM64 compilation remain unconfirmed.

No open issues 🎉

What changed in this PR

This PR addresses Node 22 ARM64 build failures by installing the VS 2022 toolchain missing from the updated Windows runner image.

Changes:

  • Install VS 2022 Build Tools only for the ARM64 + Node 22 matrix job.
  • Include VC tools, ARM64 compilers, and ARM64 ATL.
  • Accept installer exit codes 0 and 3010, while propagating other failures.
File Description
.github/​workflows/​build-windows.yml Adds conditional VS 2022 installation before building Node 22 for Windows ARM64.

Review effort: Balanced

@robertsLando
robertsLando merged commit 72dec93 into main Oct 22, 2026
10 checks passed
@robertsLando
robertsLando deleted the fix/windows-arm64-node22-vs2022 branch October 22, 2026 13:54
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.

3 participants