mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
build-win64 and build-win-arm64 both failed the v11.70 release run
(GitHub Actions run 93730167566) in "Rebuild native modules for Windows",
inside `npm install` in bundle/programs/server, while argon2's install
script compiled it:
gyp info using node-gyp@10.2.0
gyp ERR! find VS unknown version "undefined" found at
"C:\Program Files\Microsoft Visual Studio\18\Enterprise"
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! stack Error: Could not find any Visual Studio installation to use
Why. On 2026-09-07 GitHub's `windows-latest` became the
`windows-2025-vs2026` image (runner image 20260907.229.1), which carries
Visual Studio 18 (2026) and no longer 17 (2022). The node-gyp that compiles
is not one this repository installs: Meteor's bundler writes
programs/server/package.json with `"node-gyp"` pinned to the copy inside
the Meteor tool - 10.2.0 in Meteor 3.5.2 - and that version knows the major
versions 15, 16 and 17 and nothing newer. The shrinkwrap beside it does not
list node-gyp at all, so the pin is the only thing `npm install` consults.
argon2 always compiles on Windows: the amd64 bundle's win32-x64 prebuild is
there, but node-gyp-build's `node-gyp-build-test` probe runs through the
Linux-made `.bin/` shims, which are not `.cmd` files, so the probe fails and
it falls through to `node-gyp rebuild`. With Visual Studio 2022 that worked;
with 2026 and node-gyp 10 it cannot.
What changed. releases/bump-bundle-node-gyp.mjs raises an exact node-gyp pin
below 13.0.2 in a built bundle's programs/server/package.json (12.1.0 added
Visual Studio 2026 support; 13.0.1/13.0.2 fixed its version detection,
nodejs/node-gyp#3338; 13.0.2's engines accept the Node.js 24 the runners
use). It runs ONCE, in build-amd64's "Install server npm modules" step
BEFORE the first `npm install`, because every other architecture - the
Windows legs, arm64, the extra arches - reinstalls programs/server from that
same package.json, so one rewrite travels to all of them. A pin already at
or above the minimum, a range, or a bundle without a pin is left as it is,
so a Meteor release that ships a newer node-gyp keeps its own.
releases/build-release-bundle.sh does the same before its install, so a
local release bundle is what a release ships.
tests/bumpBundleNodeGyp.test.cjs pins the script's decisions (bump, keep,
no pin, dry run, unreadable, read-only), that the minimum is a node-gyp
with the Visual Studio 2026 fix, that release-all.yml runs it in the amd64
install step before `npm install` and nowhere else, and (negative) that no
workflow leg hard-codes node-gyp 10.2.0 or a GYP_MSVS_VERSION workaround.
tests/buildScriptParity.test.cjs lists the script with its bundle-time
siblings.
Not fixable from here, in the same run: the three amd64 snap jobs died in
snapcraft's LXD base-instance creation (`apt-get install -y snapd` timed
out after 600 s; the arm64 twins passed), and snap-launchpad riscv64 was
still building on Launchpad when the job cap cancelled it.
Thanks to xet7 !