This is a duplicate of #1600 which was prematurely closed. <!--- Please direct any generic questions related to actions to our support community forum at https://github.community/c/code-to-cloud/github-actions/41 ---> <!--- Before opening up a new bug report, please make sure to check for similar existing issues --> **Description:** `node-gyp` fails on the `windows-latest` test runner. **Action version:** v7 **Platform:** - [ ] Ubuntu - [ ] macOS - [x] Windows **Runner type:** - [x] Hosted - [ ] Self-hosted **Tools version:** Github windows-latest action runner **Repro steps:** Have a look at: https://github.com/diwic/setup-node-gyp-test When cloned locally, `npm i` works. But when run after setup-node on the github test runner, `npm i` fails. **Expected behavior:** ```npm install``` works on the test runner **Actual behavior:** ``` npm error command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild npm error gyp info it worked if it ends with ok npm error gyp info using node-gyp@11.5.0 npm error gyp info using node@22.23.1 | win32 | x64 npm error gyp info find Python using Python version 3.14.6 found at "C:\hostedtoolcache\windows\Python\3.14.6\x64\python.exe" npm error gyp http GET https://nodejs.org/download/release/v22.23.1/node-v22.23.1-headers.tar.gz npm error gyp http 200 https://nodejs.org/download/release/v22.23.1/node-v22.23.1-headers.tar.gz npm error gyp http GET https://nodejs.org/download/release/v22.23.1/SHASUMS256.txt npm error gyp http GET https://nodejs.org/download/release/v22.23.1/win-x64/node.lib npm error gyp http 200 https://nodejs.org/download/release/v22.23.1/SHASUMS256.txt npm error gyp http 200 https://nodejs.org/download/release/v22.23.1/win-x64/node.lib 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: RangeError [ERR_CHILD_PROCESS_STDIO_MAXB npm error gyp ERR! find VS unknown version "undefined" found at "C:\Program Files\Microsoft Visual Studio\18\Enterprise" 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:\hostedtoolcache\windows\node\22.23.1\x64\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:118:11) npm error gyp ERR! stack at VisualStudioFinder.findVisualStudio (C:\hostedtoolcache\windows\node\22.23.1\x64\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:103:5) npm error gyp ERR! stack at async createBuildDir (C:\hostedtoolcache\windows\node\22.23.1\x64\node_modules\npm\node_modules\node-gyp\lib\configure.js:112:18) npm error gyp ERR! stack at async run (C:\hostedtoolcache\windows\node\22.23.1\x64\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js:81:18) npm error gyp ERR! System Windows_NT 10.0.26100 npm error gyp ERR! command "C:\\hostedtoolcache\\windows\\node\\22.23.1\\x64\\node.exe" "C:\\hostedtoolcache\\windows\\node\\22.23.1\\x64\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" npm error gyp ERR! cwd D:\a\siriserver\siriserver\node_modules\os-service npm error gyp ERR! node -v v22.23.1 npm error gyp ERR! node-gyp -v v11.5.0 npm error gyp ERR! not ok ```