Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find Visual Studio 2022 Community with v10.0.1 #2952

Closed
paranoidPhantom opened this issue Dec 6, 2023 · 15 comments
Closed

Can't find Visual Studio 2022 Community with v10.0.1 #2952

paranoidPhantom opened this issue Dec 6, 2023 · 15 comments

Comments

@paranoidPhantom
Copy link

Was attempting to build my Electron app for production and after some research ran this command.

npx node-gyp configure --msvs_version=2022 --loglevel silly

And got this:

(it seems the bug is at lib/find-visualstudio.js:153:21)

gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli 'C:\\Users\\andre\\GitHub\\core\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'configure',
gyp verb cli '--msvs_version=2022',
gyp verb cli '--loglevel',
gyp verb cli 'silly'
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp verb find Python Python is not set from command line or npm configuration
gyp verb find Python Python is not set from environment variable PYTHON
gyp verb find Python checking if the py launcher can be used to find Python 3
gyp verb find Python - executing "py.exe" to get Python 3 executable path
gyp sill find Python execFile: exec = "py.exe"
gyp sill find Python execFile: args = ["-3","-c","import sys; print(sys.executable);"]
gyp sill find Python execFile: opts = {"env":{"ALLUSERSPROFILE":"C:\\ProgramData","AMDRMPATH":"C:\\Program Files\\AMD\\RyzenMaster\\","AMDRMSDKPATH":"C:\\Program Files\\AMD\\RyzenMasterSDK\\","APPDATA":"C:\\Users\\andre\\AppData\\Roaming","asl.log":"Destination=file","COLOR":"1","CommonProgramFiles":"C:\\Program Files\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files","CommonProgramW6432":"C:\\Program Files\\Common Files","COMPUTERNAME":"ANDREIHP","ComSpec":"C:\\WINDOWS\\system32\\cmd.exe","DriverData":"C:\\Windows\\System32\\Drivers\\DriverData","EDITOR":"C:\\WINDOWS\\notepad.exe","HOME":"C:\\Users\\andre","HOMEDRIVE":"C:","HOMEPATH":"\\Users\\andre","INIT_CWD":"C:\\Users\\andre\\GitHub\\core","LOCALAPPDATA":"C:\\Users\\andre\\AppData\\Local","LOGONSERVER":"\\\\ANDREIHP","NODE":"C:\\Program Files\\nodejs\\node.exe","NODE_EXE":"C:\\Program Files\\nodejs\\\\node.exe","NPM_CLI_JS":"C:\\Program Files\\nodejs\\\\node_modules\\npm\\bin\\npm-cli.js","npm_command":"exec","npm_config_cache":"C:\\Users\\andre\\AppData\\Local\\npm-cache","npm_config_globalconfig":"C:\\Users\\andre\\AppData\\Roaming\\npm\\etc\\npmrc","npm_config_global_prefix":"C:\\Users\\andre\\AppData\\Roaming\\npm","npm_config_init_module":"C:\\Users\\andre\\.npm-init.js","npm_config_local_prefix":"C:\\Users\\andre\\GitHub\\core","npm_config_metrics_registry":"https://registry.npmjs.org/","npm_config_node_gyp":"C:\\Users\\andre\\AppData\\Roaming\\nvm\\v18.14.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js","npm_config_noproxy":"","npm_config_prefix":"C:\\Users\\andre\\AppData\\Roaming\\npm","npm_config_userconfig":"C:\\Users\\andre\\.npmrc","npm_config_user_agent":"npm/9.3.1 node/v18.14.0 win32 x64 workspaces/false","npm_execpath":"C:\\Users\\andre\\AppData\\Roaming\\nvm\\v18.14.0\\node_modules\\npm\\bin\\npx-cli.js","npm_lifecycle_event":"npx","npm_lifecycle_script":"node-gyp","npm_node_execpath":"C:\\Program Files\\nodejs\\node.exe","npm_package_json":"C:\\Users\\andre\\GitHub\\core\\package.json","npm_package_name":"echomods","npm_package_version":"0.1.6","NPM_PREFIX_NPX_CLI_JS":"C:\\Users\\andre\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npx-cli.js","NPX_CLI_JS":"C:\\Program Files\\nodejs\\\\node_modules\\npm\\bin\\npx-cli.js","NUMBER_OF_PROCESSORS":"16","NVM_HOME":"C:\\Users\\andre\\AppData\\Roaming\\nvm","NVM_SYMLINK":"C:\\Program Files\\nodejs","OneDrive":"C:\\Users\\andre\\OneDrive - Agave\\OneDrive","OnlineServices":"Online Services","OS":"Windows_NT","Path":"C:\\Users\\andre\\GitHub\\core\\node_modules\\.bin;C:\\Users\\andre\\GitHub\\core\\node_modules\\.bin;C:\\Users\\andre\\GitHub\\node_modules\\.bin;C:\\Users\\andre\\node_modules\\.bin;C:\\Users\\node_modules\\.bin;C:\\node_modules\\.bin;C:\\Users\\andre\\AppData\\Roaming\\nvm\\v18.14.0\\node_modules\\npm\\node_modules\\@npmcli\\run-script\\lib\\node-gyp-bin;C:\\Program Files\\PowerShell\\7;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\windows\\System32\\OpenSSH\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\dotnet\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Docker\\Docker\\resources\\bin;C:\\Users\\andre\\AppData\\Roaming\\nvm;C:\\Program Files\\nodejs;C:\\Program Files\\PowerShell\\7\\;C:\\Program Files\\PowerShell\\7-preview\\preview;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\;C:\\Program Files\\Microsoft SQL Server\\150\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\Users\\andre\\AppData\\Local\\Programs\\Python\\Launcher\\;C:\\Users\\andre\\.cargo\\bin;C:\\Users\\andre\\AppData\\Local\\pnpm;C:\\Users\\andre\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\andre\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\andre\\AppData\\Roaming\\npm;C:\\Users\\andre\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\bin;C:\\Users\\andre\\.dotnet\\tools;C:\\Users\\andre\\AppData\\Local\\Programs\\oh-my-posh\\bin;C:\\Program Files\\Vim\\vim90","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL","platformcode":"KV","PNPM_HOME":"C:\\Users\\andre\\AppData\\Local\\pnpm","POSH_INSTALLER":"winget","POSH_THEMES_PATH":"C:\\Users\\andre\\AppData\\Local\\Programs\\oh-my-posh\\themes","POWERSHELL_DISTRIBUTION_CHANNEL":"MSI:Windows 10 Home","PROCESSOR_ARCHITECTURE":"AMD64","PROCESSOR_IDENTIFIER":"AMD64 Family 23 Model 96 Stepping 1, AuthenticAMD","PROCESSOR_LEVEL":"23","PROCESSOR_REVISION":"6001","ProgramData":"C:\\ProgramData","ProgramFiles":"C:\\Program Files","ProgramFiles(x86)":"C:\\Program Files (x86)","ProgramW6432":"C:\\Program Files","PROMPT":"$P$G","PSModulePath":"C:\\Users\\andre\\Documents\\PowerShell\\Modules;C:\\Program Files\\PowerShell\\Modules;c:\\program files\\powershell\\7\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules","PUBLIC":"C:\\Users\\Public","QT_SCALE_FACTOR_ROUNDING_POLICY":"RoundPreferFloor","RegionCode":"NA","SystemDrive":"C:","SystemRoot":"C:\\WINDOWS","TEMP":"C:\\Users\\andre\\AppData\\Local\\Temp","TMP":"C:\\Users\\andre\\AppData\\Local\\Temp","USERDOMAIN":"ANDREIHP","USERDOMAIN_ROAMINGPROFILE":"ANDREIHP","USERNAME":"andre","USERPROFILE":"C:\\Users\\andre","VBOX_HWVIRTEX_IGNORE_SVM_IN_USE":"1","windir":"C:\\WINDOWS","__COMPAT_LAYER":"Installer","__PSLockDownPolicy":"4","TERM":"dumb"},"shell":false}
gyp sill find Python execFile result: err = null
gyp sill find Python execFile result: stdout = "C:\\Users\\andre\\AppData\\Local\\Programs\\Python\\Python312\\python.exe\r\n"
gyp sill find Python execFile result: stderr = ""
gyp verb find Python - executable path is "C:\Users\andre\AppData\Local\Programs\Python\Python312\python.exe"
gyp verb find Python - executing "C:\Users\andre\AppData\Local\Programs\Python\Python312\python.exe" to get version
gyp sill find Python execFile: exec = "C:\\Users\\andre\\AppData\\Local\\Programs\\Python\\Python312\\python.exe"
gyp sill find Python execFile: args = ["-c","import sys; print(\"%s.%s.%s\" % sys.version_info[:3]);"]
gyp sill find Python execFile: opts = {"env":{"ALLUSERSPROFILE":"C:\\ProgramData","AMDRMPATH":"C:\\Program Files\\AMD\\RyzenMaster\\","AMDRMSDKPATH":"C:\\Program Files\\AMD\\RyzenMasterSDK\\","APPDATA":"C:\\Users\\andre\\AppData\\Roaming","asl.log":"Destination=file","COLOR":"1","CommonProgramFiles":"C:\\Program Files\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files","CommonProgramW6432":"C:\\Program Files\\Common Files","COMPUTERNAME":"ANDREIHP","ComSpec":"C:\\WINDOWS\\system32\\cmd.exe","DriverData":"C:\\Windows\\System32\\Drivers\\DriverData","EDITOR":"C:\\WINDOWS\\notepad.exe","HOME":"C:\\Users\\andre","HOMEDRIVE":"C:","HOMEPATH":"\\Users\\andre","INIT_CWD":"C:\\Users\\andre\\GitHub\\core","LOCALAPPDATA":"C:\\Users\\andre\\AppData\\Local","LOGONSERVER":"\\\\ANDREIHP","NODE":"C:\\Program Files\\nodejs\\node.exe","NODE_EXE":"C:\\Program Files\\nodejs\\\\node.exe","NPM_CLI_JS":"C:\\Program Files\\nodejs\\\\node_modules\\npm\\bin\\npm-cli.js","npm_command":"exec","npm_config_cache":"C:\\Users\\andre\\AppData\\Local\\npm-cache","npm_config_globalconfig":"C:\\Users\\andre\\AppData\\Roaming\\npm\\etc\\npmrc","npm_config_global_prefix":"C:\\Users\\andre\\AppData\\Roaming\\npm","npm_config_init_module":"C:\\Users\\andre\\.npm-init.js","npm_config_local_prefix":"C:\\Users\\andre\\GitHub\\core","npm_config_metrics_registry":"https://registry.npmjs.org/","npm_config_node_gyp":"C:\\Users\\andre\\AppData\\Roaming\\nvm\\v18.14.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js","npm_config_noproxy":"","npm_config_prefix":"C:\\Users\\andre\\AppData\\Roaming\\npm","npm_config_userconfig":"C:\\Users\\andre\\.npmrc","npm_config_user_agent":"npm/9.3.1 node/v18.14.0 win32 x64 workspaces/false","npm_execpath":"C:\\Users\\andre\\AppData\\Roaming\\nvm\\v18.14.0\\node_modules\\npm\\bin\\npx-cli.js","npm_lifecycle_event":"npx","npm_lifecycle_script":"node-gyp","npm_node_execpath":"C:\\Program Files\\nodejs\\node.exe","npm_package_json":"C:\\Users\\andre\\GitHub\\core\\package.json","npm_package_name":"echomods","npm_package_version":"0.1.6","NPM_PREFIX_NPX_CLI_JS":"C:\\Users\\andre\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npx-cli.js","NPX_CLI_JS":"C:\\Program Files\\nodejs\\\\node_modules\\npm\\bin\\npx-cli.js","NUMBER_OF_PROCESSORS":"16","NVM_HOME":"C:\\Users\\andre\\AppData\\Roaming\\nvm","NVM_SYMLINK":"C:\\Program Files\\nodejs","OneDrive":"C:\\Users\\andre\\OneDrive - Agave\\OneDrive","OnlineServices":"Online Services","OS":"Windows_NT","Path":"C:\\Users\\andre\\GitHub\\core\\node_modules\\.bin;C:\\Users\\andre\\GitHub\\core\\node_modules\\.bin;C:\\Users\\andre\\GitHub\\node_modules\\.bin;C:\\Users\\andre\\node_modules\\.bin;C:\\Users\\node_modules\\.bin;C:\\node_modules\\.bin;C:\\Users\\andre\\AppData\\Roaming\\nvm\\v18.14.0\\node_modules\\npm\\node_modules\\@npmcli\\run-script\\lib\\node-gyp-bin;C:\\Program Files\\PowerShell\\7;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\windows\\System32\\OpenSSH\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\dotnet\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Docker\\Docker\\resources\\bin;C:\\Users\\andre\\AppData\\Roaming\\nvm;C:\\Program Files\\nodejs;C:\\Program Files\\PowerShell\\7\\;C:\\Program Files\\PowerShell\\7-preview\\preview;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\;C:\\Program Files\\Microsoft SQL Server\\150\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\Users\\andre\\AppData\\Local\\Programs\\Python\\Launcher\\;C:\\Users\\andre\\.cargo\\bin;C:\\Users\\andre\\AppData\\Local\\pnpm;C:\\Users\\andre\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\andre\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\andre\\AppData\\Roaming\\npm;C:\\Users\\andre\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\bin;C:\\Users\\andre\\.dotnet\\tools;C:\\Users\\andre\\AppData\\Local\\Programs\\oh-my-posh\\bin;C:\\Program Files\\Vim\\vim90","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL","platformcode":"KV","PNPM_HOME":"C:\\Users\\andre\\AppData\\Local\\pnpm","POSH_INSTALLER":"winget","POSH_THEMES_PATH":"C:\\Users\\andre\\AppData\\Local\\Programs\\oh-my-posh\\themes","POWERSHELL_DISTRIBUTION_CHANNEL":"MSI:Windows 10 Home","PROCESSOR_ARCHITECTURE":"AMD64","PROCESSOR_IDENTIFIER":"AMD64 Family 23 Model 96 Stepping 1, AuthenticAMD","PROCESSOR_LEVEL":"23","PROCESSOR_REVISION":"6001","ProgramData":"C:\\ProgramData","ProgramFiles":"C:\\Program Files","ProgramFiles(x86)":"C:\\Program Files (x86)","ProgramW6432":"C:\\Program Files","PROMPT":"$P$G","PSModulePath":"C:\\Users\\andre\\Documents\\PowerShell\\Modules;C:\\Program Files\\PowerShell\\Modules;c:\\program files\\powershell\\7\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules","PUBLIC":"C:\\Users\\Public","QT_SCALE_FACTOR_ROUNDING_POLICY":"RoundPreferFloor","RegionCode":"NA","SystemDrive":"C:","SystemRoot":"C:\\WINDOWS","TEMP":"C:\\Users\\andre\\AppData\\Local\\Temp","TMP":"C:\\Users\\andre\\AppData\\Local\\Temp","USERDOMAIN":"ANDREIHP","USERDOMAIN_ROAMINGPROFILE":"ANDREIHP","USERNAME":"andre","USERPROFILE":"C:\\Users\\andre","VBOX_HWVIRTEX_IGNORE_SVM_IN_USE":"1","windir":"C:\\WINDOWS","__COMPAT_LAYER":"Installer","__PSLockDownPolicy":"4","TERM":"dumb"},"shell":false}
gyp sill find Python execFile result: err = null
gyp sill find Python execFile result: stdout = "3.12.0\r\n"
gyp sill find Python execFile result: stderr = ""
gyp verb find Python - version is "3.12.0"
gyp info find Python using Python version 3.12.0 found at "C:\Users\andre\AppData\Local\Programs\Python\Python312\python.exe"
gyp verb get node dir no --target version specified, falling back to host node version: 18.14.0

gyp verb install input version string "18.14.0"
gyp verb install installing version: 18.14.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 11
gyp verb needs "installVersion" 11
gyp verb install version is good
gyp verb on Windows; need to check node.lib
gyp verb get node dir target node version installed: 18.14.0
gyp verb build dir attempting to create "build" dir: C:\Users\andre\GitHub\core\build
gyp verb build dir "build" dir needed to be created? No
gyp verb find VS msvs_version not set from command line or npm config
gyp verb find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp sill find VS Running C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe [
gyp sill find VS '-ExecutionPolicy',
gyp sill find VS 'Unrestricted',
gyp sill find VS '-NoProfile',
gyp sill find VS '-Command',
gyp sill find VS "&{Add-Type -Path 'C:\\Users\\andre\\GitHub\\core\\node_modules\\node-gyp\\lib\\Find-VisualStudio.cs';[VisualStudioConfiguration.Main]::PrintJson()}"
gyp sill find VS ]
gyp sill find VS PS stderr = "Add-Type : Cannot add type. Definition of new types is not supported in this language mode.\r\nAt line:1 char:3\r\n+ &{Add-Type -Path 'C:\\Users\\andre\\GitHub\\core\\node_modules\\node-gyp\\li ...\r\n+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : PermissionDenied: (:) [Add-Type], PSNotSupportedException\r\n    + FullyQualifiedErrorId : CannotDefineNewType,Microsoft.PowerShell.Commands.AddTypeCommand\r\n \r\nUnable to find type [VisualStudioConfiguration.Main].\r\nAt line:1 char:94\r\n+ ... yp\\lib\\Find-VisualStudio.cs';[VisualStudioConfiguration.Main]::PrintJ ...\r\n+                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidOperation: (VisualStudioConfiguration.Main:TypeName) [], RuntimeException\r\n    + FullyQualifiedErrorId : TypeNotFound\r\n \r\n"
gyp sill find VS PS stdout = ""
gyp sill find VS SyntaxError: Unexpected end of JSON input
gyp sill find VS at JSON.parse (<anonymous>)
gyp sill find VS at VisualStudioFinder.parseData (C:\Users\andre\GitHub\core\node_modules\node-gyp\lib\find-visualstudio.js:153:21)
gyp sill find VS at VisualStudioFinder.findVisualStudio2017OrNewer (C:\Users\andre\GitHub\core\node_modules\node-gyp\lib\find-visualstudio.js:132:17)
gyp sill find VS at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
gyp sill find VS at async VisualStudioFinder.findVisualStudio (C:\Users\andre\GitHub\core\node_modules\node-gyp\lib\find-visualstudio.js:63:20)
gyp sill find VS at async createBuildDir (C:\Users\andre\GitHub\core\node_modules\node-gyp\lib\configure.js:69:26)
gyp sill find VS at async run (C:\Users\andre\GitHub\core\node_modules\node-gyp\bin\node-gyp.js:81:18)
gyp verb find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
gyp verb find VS looking for Visual Studio 2015
gyp sill reg running C:\WINDOWS\System32\reg.exe [
gyp sill reg 'query',
gyp sill reg 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7',
gyp sill reg '/v',
gyp sill reg '14.0'
gyp sill reg ]
gyp sill reg reg.exe stdout = ""
gyp sill reg reg.exe err = "Error: Command failed: C:\\WINDOWS\\System32\\reg.exe query HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7 /v 14.0\nERROR: The system was unable to find the specified registry key or value.\r\n\n    at ChildProcess.exithandler (node:child_process:419:12)\n    at ChildProcess.emit (node:events:513:28)\n    at maybeClose (node:internal/child_process:1091:16)\n    at ChildProcess._handle.onexit (node:internal/child_process:302:5)"
gyp sill reg reg.exe stderr = "ERROR: The system was unable to find the specified registry key or value.\r\n"
gyp sill reg running C:\WINDOWS\System32\reg.exe [
gyp sill reg 'query',
gyp sill reg 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7',
gyp sill reg '/v',
gyp sill reg '14.0'
gyp sill reg ]
gyp sill reg reg.exe stdout = ""
gyp sill reg reg.exe err = "Error: Command failed: C:\\WINDOWS\\System32\\reg.exe query HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7 /v 14.0\nERROR: The system was unable to find the specified registry key or value.\r\n\n    at ChildProcess.exithandler (node:child_process:419:12)\n    at ChildProcess.emit (node:events:513:28)\n    at maybeClose (node:internal/child_process:1091:16)\n    at ChildProcess._handle.onexit (node:internal/child_process:302:5)"
gyp sill reg reg.exe stderr = "ERROR: The system was unable to find the specified registry key or value.\r\n"
gyp verb find VS - not found
gyp verb find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (C:\Users\andre\GitHub\core\node_modules\node-gyp\lib\find-visualstudio.js:113:11)
gyp ERR! stack at VisualStudioFinder.findVisualStudio (C:\Users\andre\GitHub\core\node_modules\node-gyp\lib\find-visualstudio.js:69:17)
gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
gyp ERR! stack at async createBuildDir (C:\Users\andre\GitHub\core\node_modules\node-gyp\lib\configure.js:69:26)
gyp ERR! stack at async run (C:\Users\andre\GitHub\core\node_modules\node-gyp\bin\node-gyp.js:81:18)
gyp ERR! System Windows_NT 10.0.22635
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\andre\\GitHub\\core\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--msvs_version=2022" "--loglevel" "silly"
gyp ERR! cwd C:\Users\andre\GitHub\core
gyp ERR! node -v v18.14.0
gyp ERR! node-gyp -v v10.0.1
gyp ERR! not ok
@paranoidPhantom
Copy link
Author

Just discovered that #2449 attempts to fix this, but the PR is still open.

@paranoidPhantom paranoidPhantom changed the title Can't find Visual Studio 2022 Community with [email protected] Can't find Visual Studio 2022 Community with [email protected] Dec 6, 2023
@paranoidPhantom paranoidPhantom changed the title Can't find Visual Studio 2022 Community with [email protected] Can't find Visual Studio 2022 Community with v10.0.1 Dec 6, 2023
@cclauss
Copy link
Contributor

cclauss commented Apr 11, 2024

Please try our new installation recommendations:

@7999
Copy link

7999 commented May 10, 2024

i met the same issue

@cclauss
Copy link
Contributor

cclauss commented May 10, 2024

Please provide:

  • Command typed
  • Full error log
  • The results of py --list

@7999
Copy link

7999 commented May 10, 2024

@cclauss
execute command: npm install --loglevel silly

py --list
-V:3.12 * Python 3.12 (64-bit)
-V:3.11 Python 3.11 (64-bit)

error log:

error gyp info it worked if it ends with ok
error gyp verb cli [
error gyp verb cli 'C:\Program Files\nodejs\node.exe',
error gyp verb cli 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js',
error gyp verb cli 'rebuild'
error gyp verb cli ]
error gyp info using [email protected]
error gyp info using [email protected] | win32 | x64
error gyp verb clean removing "build" directory
error gyp verb find Python Python is not set from command line or npm configuration
error gyp verb find Python Python is not set from environment variable PYTHON
error gyp verb find Python checking if the py launcher can be used to find Python 3
error gyp verb find Python - executing "py.exe" to get Python 3 executable path
error gyp sill find Python execFile: exec = "py.exe"
error gyp sill find Python execFile: args = ["-3","-c","import sys; print(sys.executable);"]
error gyp sill find Python execFile result: err = null
error gyp sill find Python execFile result: stdout = "C:\Python312\python.exe\r\n"
error gyp sill find Python execFile result: stderr = ""
error gyp verb find Python - executable path is "C:\Python312\python.exe"
error gyp verb find Python - executing "C:\Python312\python.exe" to get version
error gyp sill find Python execFile: exec = "C:\Python312\python.exe"
error gyp sill find Python execFile: args = ["-c","import sys; print("%s.%s.%s" % sys.version_info[:3]);"]
error gyp sill find Python execFile result: err = null
error gyp sill find Python execFile result: stdout = "3.12.3\r\n"
error gyp sill find Python execFile result: stderr = ""
error gyp verb find Python - version is "3.12.3"
error gyp info find Python using Python version 3.12.3 found at "C:\Python312\python.exe"
error gyp verb get node dir no --target version specified, falling back to host node version: 18.19.0
error gyp verb install input version string "18.19.0"
error gyp verb install installing version: 18.19.0
error gyp verb install --ensure was passed, so won't reinstall if already installed
error gyp verb install version not already installed, continuing with install 18.19.0
error gyp verb ensuring devDir is created C:\Users\xxx\AppData\Local\node-gyp\Cache\18.19.0
error gyp verb created devDir C:\Users\xxx\AppData\Local\node-gyp\Cache\18.19.0
error gyp verb tarball done parsing tarball
error gyp verb on Windows; need to download node.lib...
error gyp verb x64 node.lib dir C:\Users\xxx\AppData\Local\Temp\node-gyp-tmp-8RcysJ\x64
error gyp verb x64 node.lib url https://nodejs.org/download/release/v18.19.0/win-x64/node.lib
error gyp verb check download content checksum, need to download SHASUMS256.txt...
error gyp verb checksum url https://nodejs.org/download/release/v18.19.0/SHASUMS256.txt
error gyp http GET https://nodejs.org/download/release/v18.19.0/SHASUMS256.txt
error gyp verb streaming x64 node.lib to: C:\Users\xxx\AppData\Local\Temp\node-gyp-tmp-8RcysJ\x64\node.lib
error gyp http GET https://nodejs.org/download/release/v18.19.0/win-x64/node.lib
error gyp http 200 https://nodejs.org/download/release/v18.19.0/SHASUMS256.txt
error gyp verb checksum data {"node-v18.19.0-aix-ppc64.tar.gz":"cb4a41694e46e9e3d744be83fb9d4aebcf8004cfb51b9460253054b5356f686c","node-v18.19.0-darwin-arm64.tar.gz":"8907c42a968765b77730fb319458d63ec4ed009265f8012097c3a052407aa99b","node-v18.19.0-darwin-arm64.tar.xz":"857885257c586fb13c93d33d326ca82056ba8b7445ce27cf34dd406add04158e","node-v18.19.0-darwin-x64.tar.gz":"0a749fcdf5d6bf46e1c17b3ea01e050b4d1ec3f3073b14aa745527b45a759c74","node-v18.19.0-darwin-x64.tar.xz":"4f60b40071c6a67482b99d22a5265839177b8706a2b13b493396f368f0b42b00","node-v18.19.0-headers.tar.gz":"e55820818dc52fd1cf3a86380c6244a8723be2551d97d7d0768d9716b296e0dd","node-v18.19.0-headers.tar.xz":"4045feaea77904480ee7e6b78913408a0335d1b78a249a492bb1979ff7feb3ed","node-v18.19.0-linux-arm64.tar.gz":"4297548671897a1ba6a9a78726cb3f53458048948b4f71d597886ccf799db603","node-v18.19.0-linux-arm64.tar.xz":"cf94ab72e45b855257545fec1c017bdf30a9e23611561382eaf64576b999e72d","node-v18.19.0-linux-armv7l.tar.gz":"dadebc4ffccc75e2185ec1d8223745c010a68f6644583eb1396c3ae1f9431b97","node-v18.19.0-linux-armv7l.tar.xz":"274c8747763e5d4a764f00c931da9bb541ccf0633d21e69bf14434a5b49f35e5","node-v18.19.0-linux-ppc64le.tar.gz":"51ef1765099dffdb4c36545e91533aa7ec7bf3b748dac00f79f67d8229708990","node-v18.19.0-linux-ppc64le.tar.xz":"80a41e72de675d5ce9336f1527822763253da932cdf4dfb599ac30a7f202bca8","node-v18.19.0-linux-s390x.tar.gz":"83a8a3efb96fa7d9002f17d50d871a1a22453307003e57ba1a87713a2b223789","node-v18.19.0-linux-s390x.tar.xz":"cd3ce5eaf1300f31329fd36e19103dfb0c5a45f7c547166959392c79c99bc864","node-v18.19.0-linux-x64.tar.gz":"153312ae9fe8684f345100e4d141a521dc542b36d8c1e09c31ac290eae98c62a","node-v18.19.0-linux-x64.tar.xz":"61632bb78ee828d6e8f42adc0bc2238a6b8200007093988d3927176a372281e8","node-v18.19.0.pkg":"06f3103a629dd864eca32464462bfceb0ae4f6beb134b5cdcdc6be4fecfaf594","node-v18.19.0.tar.gz":"dd4c1dc1cb94e1e29f65a3a592247edeb8ceb23483123b0e1847d75c5f0b0c17","node-v18.19.0.tar.xz":"f52b41af20596a9abd8ed75241837ec43945468221448bbf841361e2091819b6","node-v18.19.0-win-x64.7z":"791dacc5009229c6aaea3bbb36b902b796d2408af4a1d9360417be6302b19e1f","node-v18.19.0-win-x64.zip":"5311913d45e1fcc3643c58d1e3926eb85437b180f025fe5857413c9f02403645","node-v18.19.0-win-x86.7z":"20f25cae81d514a0027f8e0b52bacdb2a4960298f6bfb061d29875043720ef1b","node-v18.19.0-win-x86.zip":"3171148f735954bdca8adccb2200379e61142e0f5a2bdb4ca6432afb0d9951df","node-v18.19.0-x64.msi":"31976e025ea9b9324ec5db25cf04af8b52d8c0505e8bffe9a68176c48761ad06","node-v18.19.0-x86.msi":"ac65503bf86cd45cc50f50695395bb04f1ac5aa49a4214e2588ca6cac032cd5a","win-x64/node.exe":"770f43909f282d2ee020aa90fd580ee767fcdc7067bfa25d2095b56f5d74f0e9","win-x64/node.lib":"e196651f3f29544b7f390de22ec170e401b75d445bc6032b0cc2848904565fdd","win-x64/node_pdb.7z":"b72208250f938d07600fd5bbce2cb59af272743488e29035e6b8275a2710beb0","win-x64/node_pdb.zip":"894c0d31ae63ee9f5b19a0a1c0a2028a2ce02af73230caf22c6422865b6df6c2","win-x86/node.exe":"826f1377dcf11257d10fc84d1c32bab8d1e9e726ac90b6b854828a432f28faaa","win-x86/node.lib":"2b92b61e4507a95f00bf7788ba156077cbf432857d17ac1da9d994cae75fe987","win-x86/node_pdb.7z":"0d33381e0f60392cb6e09e92c1a37fe06b029ab5d39aac2f0ea5b7995a4da9ba","win-x86/node_pdb.zip":"26136d71c36d938667520796e928a77326ff84e2f55fdd7b436ac2b6a4739037"}
error gyp http 200 https://nodejs.org/download/release/v18.19.0/win-x64/node.lib
error gyp verb content checksum win-x64/node.lib e196651f3f29544b7f390de22ec170e401b75d445bc6032b0cc2848904565fdd
error gyp verb download contents checksum {"node-v18.19.0-headers.tar.gz":"e55820818dc52fd1cf3a86380c6244a8723be2551d97d7d0768d9716b296e0dd","win-x64/node.lib":"e196651f3f29544b7f390de22ec170e401b75d445bc6032b0cc2848904565fdd"}
error gyp verb validating download checksum for node-v18.19.0-headers.tar.gz (e55820818dc52fd1cf3a86380c6244a8723be2551d97d7d0768d9716b296e0dd == e55820818dc52fd1cf3a86380c6244a8723be2551d97d7d0768d9716b296e0dd)
error gyp verb validating download checksum for win-x64/node.lib (e196651f3f29544b7f390de22ec170e401b75d445bc6032b0cc2848904565fdd == e196651f3f29544b7f390de22ec170e401b75d445bc6032b0cc2848904565fdd)
error gyp verb get node dir target node version installed: 18.19.0
error gyp verb build dir attempting to create "build" dir: D:\WS\appium-service\node_modules\node-pty\build
error gyp verb build dir "build" dir needed to be created? Yes
error gyp verb find VS msvs_version not set from command line or npm config
error gyp verb find VS VCINSTALLDIR not set, not running in VS Command Prompt
error gyp sill find VS Running C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe [
error gyp sill find VS '-ExecutionPolicy',
error gyp sill find VS 'Unrestricted',
error gyp sill find VS '-NoProfile',
error gyp sill find VS '-Command',
error gyp sill find VS "&{Add-Type -Path 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\Find-VisualStudio.cs';[VisualStudioConfiguration.Main]::PrintJson()}"
error gyp sill find VS ]
error gyp sill find VS PS stderr = ""
error gyp sill find VS processing installation: "C:\Program Files\Microsoft Visual Studio\2022\Professional"
error gyp sill find VS - version match = ["17.8.34701.33","17","8"]
error gyp sill find VS - found VC.MSBuild.Base
error gyp sill find VS - found VC.Tools.x86.x64
error gyp sill find VS processing installation: "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
error gyp sill find VS - version match = ["16.11.31624.102","16","11"]
error gyp sill find VS - found VC.MSBuild.Base
error gyp sill find VS - found VC.Tools.x86.x64
error gyp sill find VS vsInfo: [
error gyp sill find VS {
error gyp sill find VS version: '17.8.34701.33',
error gyp sill find VS versionMajor: 17,
error gyp sill find VS versionMinor: 8,
error gyp sill find VS versionYear: 2022,
error gyp sill find VS path: 'C:\Program Files\Microsoft Visual Studio\2022\Professional',
error gyp sill find VS msBuild: 'C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe',
error gyp sill find VS toolset: 'v143',
error gyp sill find VS sdk: null
error gyp sill find VS },
error gyp sill find VS {
error gyp sill find VS version: '16.11.31624.102',
error gyp sill find VS versionMajor: 16,
error gyp sill find VS versionMinor: 11,
error gyp sill find VS versionYear: 2019,
error gyp sill find VS path: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools',
error gyp sill find VS msBuild: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe',
error gyp sill find VS toolset: 'v142',
error gyp sill find VS sdk: null
error gyp sill find VS }
error gyp sill find VS ]
error gyp verb find VS checking VS2022 (17.8.34701.33) found at:
error gyp verb find VS "C:\Program Files\Microsoft Visual Studio\2022\Professional"
error gyp verb find VS - found "Visual Studio C++ core features"
error gyp verb find VS - found VC++ toolset: v143
error gyp verb find VS - missing any Windows SDK
error gyp verb find VS checking VS2019 (16.11.31624.102) found at:
error gyp verb find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
error gyp verb find VS - found "Visual Studio C++ core features"
error gyp verb find VS - found VC++ toolset: v142
error gyp verb find VS - missing any Windows SDK
error gyp verb find VS could not find a version of Visual Studio 2017 or newer to use
error gyp verb find VS looking for Visual Studio 2015
error gyp sill reg running C:\WINDOWS\System32\reg.exe [
error gyp sill reg 'query',
error gyp sill reg 'HKLM\Software\Microsoft\VisualStudio\SxS\VC7',
error gyp sill reg '/v',
error gyp sill reg '14.0'
error gyp sill reg ]
error gyp sill reg reg.exe stdout = ""
error gyp sill reg reg.exe err = "Error: Command failed: C:\WINDOWS\System32\reg.exe query HKLM\Software\Microsoft\VisualStudio\SxS\VC7 /v 14.0\nERROR: The system was unable to find the specified registry key or value.\r\n\n at ChildProcess.exithandler (node:child_process:422:12)\n at ChildProcess.emit (node:events:517:28)\n at maybeClose (node:internal/child_process:1098:16)\n at ChildProcess._handle.onexit (node:internal/child_process:303:5)"
error gyp sill reg reg.exe stderr = "ERROR: The system was unable to find the specified registry key or value.\r\n"
error gyp sill reg running C:\WINDOWS\System32\reg.exe [
error gyp sill reg 'query',
error gyp sill reg 'HKLM\Software\Wow6432Node\Microsoft\VisualStudio\SxS\VC7',
error gyp sill reg '/v',
error gyp sill reg '14.0'
error gyp sill reg ]
error gyp sill reg reg.exe stdout = ""
error gyp sill reg reg.exe err = "Error: Command failed: C:\WINDOWS\System32\reg.exe query HKLM\Software\Wow6432Node\Microsoft\VisualStudio\SxS\VC7 /v 14.0\nERROR: The system was unable to find the specified registry key or value.\r\n\n at ChildProcess.exithandler (node:child_process:422:12)\n at ChildProcess.emit (node:events:517:28)\n at maybeClose (node:internal/child_process:1098:16)\n at ChildProcess._handle.onexit (node:internal/child_process:303:5)"
error gyp sill reg reg.exe stderr = "ERROR: The system was unable to find the specified registry key or value.\r\n"
error gyp verb find VS - not found
error gyp verb find VS not looking for VS2013 as it is only supported up to Node.js 8
error gyp ERR! find VS
error gyp ERR! find VS msvs_version not set from command line or npm config
error gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
error gyp ERR! find VS checking VS2022 (17.8.34701.33) found at:
error gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Professional"
error gyp ERR! find VS - found "Visual Studio C++ core features"
error gyp ERR! find VS - found VC++ toolset: v143
error gyp ERR! find VS - missing any Windows SDK
error gyp ERR! find VS checking VS2019 (16.11.31624.102) found at:
error gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
error gyp ERR! find VS - found "Visual Studio C++ core features"
error gyp ERR! find VS - found VC++ toolset: v142
error gyp ERR! find VS - missing any Windows SDK
error gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
error gyp ERR! find VS looking for Visual Studio 2015
error gyp ERR! find VS - not found
error gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
error gyp ERR! find VS
error gyp ERR! find VS **************************************************************
error gyp ERR! find VS You need to install the latest version of Visual Studio
error gyp ERR! find VS including the "Desktop development with C++" workload.
error gyp ERR! find VS For more information consult the documentation at:
error gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
error gyp ERR! find VS **************************************************************
error gyp ERR! find VS
error gyp ERR! configure error
error gyp ERR! stack Error: Could not find any Visual Studio installation to use
error gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:113:11)
error gyp ERR! stack at VisualStudioFinder.findVisualStudio (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:69:17)
error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
error gyp ERR! stack at async createBuildDir (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:69:26)
error gyp ERR! stack at async run (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js:81:18)
error gyp ERR! System Windows_NT 10.0.19045
error gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
error gyp ERR! cwd D:\WS\service\node_modules\node-pty
error gyp ERR! node -v v18.19.0
error gyp ERR! node-gyp -v v10.0.1
error gyp ERR! not ok

@StefanStojanovic
Copy link
Contributor

I've checked the logs provided.

  1. In the issue description we can see:
gyp sill find VS PS stderr = "Add-Type : Cannot add type. Definition of new types is not supported in this language mode.\r\nAt line:1 char:3\r\n+ &{Add-Type -Path 'C:\\Users\\andre\\GitHub\\core\\node_modules\\node-gyp\\li ...\r\n+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : PermissionDenied: (:) [Add-Type], PSNotSupportedException\r\n    + FullyQualifiedErrorId : CannotDefineNewType,Microsoft.PowerShell.Commands.AddTypeCommand\r\n \r\nUnable to find type [VisualStudioConfiguration.Main].\r\nAt line:1 char:94\r\n+ ... yp\\lib\\Find-VisualStudio.cs';[VisualStudioConfiguration.Main]::PrintJ ...\r\n+                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidOperation: (VisualStudioConfiguration.Main:TypeName) [], RuntimeException\r\n    + FullyQualifiedErrorId : TypeNotFound\r\n \r\n"
gyp sill find VS PS stdout = ""
gyp sill find VS SyntaxError: Unexpected end of JSON input
gyp sill find VS at JSON.parse (<anonymous>)
gyp sill find VS at VisualStudioFinder.parseData (C:\Users\andre\GitHub\core\node_modules\node-gyp\lib\find-visualstudio.js:153:21)
gyp sill find VS at VisualStudioFinder.findVisualStudio2017OrNewer (C:\Users\andre\GitHub\core\node_modules\node-gyp\lib\find-visualstudio.js:132:17)
gyp sill find VS at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
gyp sill find VS at async VisualStudioFinder.findVisualStudio (C:\Users\andre\GitHub\core\node_modules\node-gyp\lib\find-visualstudio.js:63:20)
gyp sill find VS at async createBuildDir (C:\Users\andre\GitHub\core\node_modules\node-gyp\lib\configure.js:69:26)
gyp sill find VS at async run (C:\Users\andre\GitHub\core\node_modules\node-gyp\bin\node-gyp.js:81:18)

Based on this, it seems that running Add-Type is an issue. To use it, you need to be in the FullLanguage language mode in PS, so can you please check your language mode (run $ExecutionContext.SessionState.LanguageMode in PS) and make sure it has the required value?

  1. The issue in the comment is not the same, but it is connected to Visual Studio checks. In that one, Add-Type is able to run, and we find both VS2022 and VS2019, but Windows SDK is missing in both
error gyp ERR! find VS checking VS2022 (17.8.34701.33) found at:
error gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Professional"
error gyp ERR! find VS - found "Visual Studio C++ core features"
error gyp ERR! find VS - found VC++ toolset: v143
error gyp ERR! find VS - missing any Windows SDK
error gyp ERR! find VS checking VS2019 (16.11.31624.102) found at:
error gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
error gyp ERR! find VS - found "Visual Studio C++ core features"
error gyp ERR! find VS - found VC++ toolset: v142
error gyp ERR! find VS - missing any Windows SDK

Installing Windows SDK in any of those VSs should resolve the issue.

@7999
Copy link

7999 commented Jul 29, 2024

@StefanStojanovic
thanks for your reply.
but you said the two issue, they are already met.
1
image
2 in Registry, it shows there already installed Windows SDK
image

@StefanStojanovic
Copy link
Contributor

@7999 Thanks for your reply. In your case language mode was not an issue, so it makes sense that for you it was set to FullLanguage.

Regarding the Windows SDKs, they should be installed through Visual Studio Installer. Can you please start your Visual Studio Installer, then choose Modify (you can do this check for both VS2019 and VS2022), then in Installation details expand Desktop development with C++ and see if any Windows SDK is checked? e.g.

image

@7999
Copy link

7999 commented Jul 29, 2024

@StefanStojanovic
in my computer, I only installed VS 2022 and VS Build Tools 2019, no VS2019.
detail:
image

@StefanStojanovic
Copy link
Contributor

Hmm, and the silly level log is still like this?

@7999
Copy link

7999 commented Jul 29, 2024

@StefanStojanovic
I was busy on other work recently, and maybe the development environment updated during the time, so I need to check again, but i need some time

@kstojanovski-novatec
Copy link

kstojanovski-novatec commented Sep 6, 2024

Do you have any workaround for this situation?
-> Installing SDK 10 manually helped me out of this situation.

image

@7999
Copy link

7999 commented Sep 6, 2024

@kstojanovski-novatec
thanks a lot, it also works for me

@prisis
Copy link

prisis commented Sep 23, 2024

Thank you @kstojanovski-novatec , this works

@StefanStojanovic
Copy link
Contributor

I'm glad to see that this workaround works for multiple users now. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants