Repository navigation
Build toolchain compatibility with Visual Studio 2026 #60861
Description
Activity
I'm pretty confident that Node.js 20 and 22 will stay with npm 10. I think changing the toolchain requirements is a breaking change
cc @nodejs/platform-windows
FWIW
node-gyponly applies to addons (including building the addon and node-api tests).Building Node.js itself relies on the copy of
gyp-nextintools/gyp(which is separate from whatever is in npm). I don't know if that can be safely updated in Node.js 20 and 22 without breaking something else (e.g. minimum Python version).Reacted by Mike McCreadyI have not tried to build Node.js from source on Windows and I may have misinterpreted the information in the toolchain compatibility table.
I noticed the problem trying to install the npm package cpu-features@0.0.10 using Node.js
22.21.1(with npm10.9.4, Python3.14.0) on Windows 1125H2and I assumed this would also apply to Node.js itself.If this isn't relevant for the core of Node.js, then please feel free to close the issue.
Repro steps for npm module needing node-gyp
Install Visual Studio Build Tools 2026 18.0.2 with workload "Desktop development with C++" (see docs https://learn.microsoft.com/en-us/visualstudio/releases/2026/release-history).
In Git Bash:
cd $(mktemp -d) npm install cpu-features
$ cd $(mktemp -d) npm install cpu-features npm error code 1 npm error path C:\Users\mikem\AppData\Local\Temp\tmp.AyQiFSDsdu\node_modules\cpu-features npm error command failed npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node buildcheck.js > buildcheck.gypi && node-gyp rebuild npm error gyp info it worked if it ends with ok npm error gyp info using node-gyp@11.2.0 npm error gyp info using node@22.21.1 | win32 | x64 npm error gyp info find Python using Python version 3.14.0 found at "C:\Python314\python.exe" npm error gyp ERR! find VS npm error gyp ERR! find VS msvs_version not set from command line or npm config npm error gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt npm error gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details. npm error gyp ERR! find VS npm error gyp ERR! find VS Failure details: undefined npm error gyp ERR! find VS unknown version "undefined" found at "C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools" npm error gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21 npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21 npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21 npm error gyp ERR! find VS not looking for VS2015 as it is only supported up to Node.js 18 npm error gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 npm error gyp ERR! find VS npm error gyp ERR! find VS ************************************************************** npm error gyp ERR! find VS You need to install the latest version of Visual Studio npm error gyp ERR! find VS including the "Desktop development with C++" workload. npm error gyp ERR! find VS For more information consult the documentation at: npm error gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows npm error gyp ERR! find VS ************************************************************** npm error gyp ERR! find VS npm error gyp ERR! configure error npm error gyp ERR! stack Error: Could not find any Visual Studio installation to use npm error gyp ERR! stack at VisualStudioFinder.fail (C:\Users\mikem\AppData\Local\nvm\v22.21.1\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:118:11) npm error gyp ERR! stack at VisualStudioFinder.findVisualStudio (C:\Users\mikem\AppData\Local\nvm\v22.21.1\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:17) npm error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:105:5) npm error gyp ERR! stack at async createBuildDir (C:\Users\mikem\AppData\Local\nvm\v22.21.1\node_modules\npm\node_modules\node-gyp\lib\configure.js:112:18) npm error gyp ERR! stack at async run (C:\Users\mikem\AppData\Local\nvm\v22.21.1\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js:81:18) npm error gyp ERR! System Windows_NT 10.0.26200 npm error gyp ERR! command "C:\\nvm4w\\nodejs\\node.exe" "C:\\Users\\mikem\\AppData\\Local\\nvm\\v22.21.1\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" npm error gyp ERR! cwd C:\Users\mikem\AppData\Local\Temp\tmp.AyQiFSDsdu\node_modules\cpu-features npm error gyp ERR! node -v v22.21.1 npm error gyp ERR! node-gyp -v v11.2.0 npm error gyp ERR! not okThe patch that adds support for VS 2026 in gyp-next is quite small. We could probably backport it
The patch that adds support for VS 2026 in gyp-next is quite small. We could probably backport it
It sounds like this would be #60645
I'm thinking about nodejs/gyp-next@cb13bbc
There are two different issues mixed up in this issue submission:
- installing npm packages requiring rebuild with
node-gyp - building Node.js from source
I'm going to close this issue and re-submit so that it only covers building Node.js from source
- installing npm packages requiring rebuild with
Continued in replacement issue #60869
- added a commit that references this issue
on Jun 18, 2026
Current situation
BUILDING > Supported toolchains for Windows lists the following compatible Visual Studio versions:
Compatibility with Visual Studio 2026 requires node-gyp@12.1.0 which is bundled in npm@11.6.3.
Expected
"Visual Studio >=" can only be used where there is compatibility to Visual Studio 2026. This however requires a minimum of npm@11.6.3. PR #60853 proposes upgrading npm to
11.6.4and this can be expected to be applied on Node.js24.xand25.xIf Node.js
20.xand22.xstay with npm10.x, then the supported toolchain would need to exclude Visual Studio 2026 and be changed to:Reference