Skip to content

chore: upgrade to @electron-forge v8 + windows-2025 runner when forge 8 stable ships #610

Description

@nerdCopter

AI Generated issue-ticket

Context

PR #609 (merged 2026-06-18) restored Windows CI by downgrading the runner from `windows-2025` to `windows-2022`.
This is a temporary workaround. The permanent fix requires two upstream releases that do not exist yet.

Root cause (fully investigated — no re-investigation needed)

The `windows-2025` GitHub Actions runner image was updated ~2026-06-16 to install
Visual Studio 2025 (version 18) at `C:\Program Files\Microsoft Visual Studio\18\Enterprise`.

`@electron-forge@7.x` uses `@electron/rebuild@^3.7.x` which bundles `@electron/node-gyp@10.2.0-electron.1`.
That version's `find-visualstudio.js` only maps VS major versions 15/16/17 to years 2017/2019/2022.
Version 18 (VS 2025) is unrecognized, triggering `ERR_CHILD_PROCESS_STDIO_MAXBUFFER` in the PowerShell
VS-enumeration path and falling through to a path it cannot use — breaking `@serialport/bindings-cpp`
rebuild during `electron-forge make`.

No version of `node-gyp` (including `@electron/node-gyp@10.2.0-electron.2`, `node-gyp@12`, `node-gyp@13`)
maps VS major version 18 yet. This is an upstream gap across the whole node-gyp ecosystem.

The permanent fix (two steps, in order)

Step 1 — wait for `@electron-forge@8` stable release

`@electron-forge@8` (`8.0.0-alpha.9` as of 2026-06-18, milestone has 15 open issues, no due date)
switches `@electron/rebuild` from `3.x` (using `@electron/node-gyp`) to `4.x` (using standard
`node-gyp@^12.x`). Standard `node-gyp` has a larger upstream community and will gain VS 18 support sooner.

Check: https://github.com/electron/forge/releases
Currently: `latest = 7.11.2`, `alpha = 8.0.0-alpha.9`

Step 2 — verify `node-gyp@12+` maps VS 18 (versionMajor 18 → versionYear 2025)

The fix in `find-visualstudio.js` is a one-liner addition:

if (ret.versionMajor === 18) { ret.versionYear = 2025 }
// plus getMSBuild / getToolset entries for 2025

Check: https://github.com/nodejs/node-gyp/blob/main/lib/find-visualstudio.js

Once both are satisfied:

Implementation checklist

  • Upgrade all `@electron-forge/*` packages in `package.json` from `7.x` to latest `8.x`
  • Run `yarn install` and resolve any forge 8 breaking changes (plugin/maker API may differ)
  • In `.github/workflows/build.yml`, change `windows-2022` back to `windows-2025` (both matrix entries, lines ~34–39)
  • Verify `@serialport/bindings-cpp` rebuilds cleanly on `windows-2025` CI
  • The `forge.config.js` `ignoreModules` entries for `exe-icon-extractor` and `usb` remain valid — keep them

Files to change

  • `package.json` — `@electron-forge/*` version bumps
  • `.github/workflows/build.yml` — `windows-2022` → `windows-2025` (both matrix entries)
  • `forge.config.js` — no changes needed

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions