Skip to content

Windows build: clarify supported MSVC/Visual Studio versions (node-gyp) + avoid postinstall node_modules patches #102

@DeadWaveWave

Description

@DeadWaveWave

Some contributors report Windows build failures when only VS 2025/2026 Build Tools are installed (MSVC versionMajor=18).

Context

  • Our native deps (e.g. better-sqlite3, node-pty) are rebuilt during pnpm install via electron-builder install-app-deps (app-builder-lib -> @electron/rebuild).
  • Today we pull @electron/rebuild@4.0.3 -> node-gyp@11.5.0.
  • node-gyp@11.5.0's VS detection currently maps versionMajor {15,16,17} -> {2017,2019,2022}. versionMajor=18 is treated as unsupported, and the supported-years list is [2019, 2022].
    • This means VS Build Tools v18 may not be detected.

What we want

  • Short term (docs): document Windows prerequisites in CONTRIBUTING.md (VS 2022 Build Tools + Desktop development with C++ workload / Windows SDK) and add a troubleshooting note for VS v18-only setups.
  • Long term (proper fix): investigate whether upgrading electron-builder / app-builder-lib / @electron/rebuild (and therefore node-gyp) provides native support for MSVC versionMajor=18, instead of patching node_modules in postinstall.

Non-goals

  • We should not ship a postinstall script that mutates files under node_modules/.pnpm/... using string replacement (too brittle across version bumps, and risky cross-platform).

Acceptance

  • Clear docs for Windows contributors so pnpm install succeeds.
  • If upstream supports MSVC v18, update deps and keep CI green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions