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

Windows 11 SDK (10.0.22000) is not supported #2527

Closed
ShenHongFei opened this issue Oct 18, 2021 · 19 comments · Fixed by #2565
Closed

Windows 11 SDK (10.0.22000) is not supported #2527

ShenHongFei opened this issue Oct 18, 2021 · 19 comments · Fixed by #2565
Labels
Node Sass --> Dart Sass https://github.com/sass/node-sass/issues/2952 Windows

Comments

@ShenHongFei
Copy link

ShenHongFei commented Oct 18, 2021

  • Node Version: 16.11.1

  • Platform:
    OS Name: Microsoft Windows 11 Pro
    OS Version: 10.0.22000 N/A Build 22000
    System Type: x64-based PC

  • Compiler:
    C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133
    msbuild: 16.11.1.47101
    cl: 19.29.30136

  • Module: winax

Verbose output (from npm or node-gyp):
231 error code 1
232 error path d:\0\node_modules\winax
233 error command failed
234 error command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
235 error gyp info it worked if it ends with ok
235 error gyp info using node-gyp@7.1.2
235 error gyp info using node@16.11.1 | win32 | x64
235 error gyp info find Python using Python version 3.10.0 found at "e:\sdk\python\python.exe"
235 error gyp ERR! find VS
235 error gyp ERR! find VS msvs_version was set from command line or npm config
235 error gyp ERR! find VS - looking for Visual Studio version 2019
235 error gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
235 error gyp ERR! find VS checking VS2019 (16.11.31729.503) found at:
235 error gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
235 error gyp ERR! find VS - found "Visual Studio C++ core features"
235 error gyp ERR! find VS - found VC++ toolset: v142
235 error gyp ERR! find VS - missing any Windows SDK
235 error gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
235 error gyp ERR! find VS looking for Visual Studio 2015
235 error gyp ERR! find VS - not found
235 error gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
235 error gyp ERR! find VS
235 error gyp ERR! find VS valid versions for msvs_version:
235 error gyp ERR! find VS
235 error gyp ERR! find VS **************************************************************
235 error gyp ERR! find VS You need to install the latest version of Visual Studio
235 error gyp ERR! find VS including the "Desktop development with C++" workload.
235 error gyp ERR! find VS For more information consult the documentation at:
235 error gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
235 error gyp ERR! find VS **************************************************************
235 error gyp ERR! find VS
235 error gyp ERR! configure error
235 error gyp ERR! stack Error: Could not find any Visual Studio installation to use
235 error gyp ERR! stack     at VisualStudioFinder.fail (d:\0\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
235 error gyp ERR! stack     at d:\0\node_modules\node-gyp\lib\find-visualstudio.js:74:16
235 error gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (d:\0\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
235 error gyp ERR! stack     at d:\0\node_modules\node-gyp\lib\find-visualstudio.js:70:14
235 error gyp ERR! stack     at d:\0\node_modules\node-gyp\lib\find-visualstudio.js:372:16
235 error gyp ERR! stack     at d:\0\node_modules\node-gyp\lib\util.js:54:7
235 error gyp ERR! stack     at d:\0\node_modules\node-gyp\lib\util.js:33:16
235 error gyp ERR! stack     at ChildProcess.exithandler (node:child_process:404:5)
235 error gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
235 error gyp ERR! stack     at maybeClose (node:internal/child_process:1064:16)
235 error gyp ERR! System Windows_NT 10.0.22000
235 error gyp ERR! command "e:\\sdk\\nodejs\\node.exe" "d:\\0\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
235 error gyp ERR! cwd d:\0\node_modules\winax
235 error gyp ERR! node -v v16.11.1
235 error gyp ERR! node-gyp -v v7.1.2
235 error gyp ERR! not ok
236 verbose exit 1

node-gyp/lib/find-visualstudio.js#getSDK could not recognize Microsoft.VisualStudio.Component.Windows11SDK.22000 in info.packages because the pattern const win10SDKPrefix = 'Microsoft.VisualStudio.Component.Windows10SDK.' doesn't match.

my info.packages contrains

...
'Microsoft.VisualStudio.Component.Windows11SDK.22000',
'Win11SDK_10.0.22000',
...
'Microsoft.VisualStudio.Component.Windows10SDK',
...

After I changed this line https://github.com/nodejs/node-gyp/blob/master/lib/find-visualstudio.js#L184
to ret.sdk = '10'
node-gyp configure and node-gyp build could run successfully.

@ShenHongFei
Copy link
Author

image

@cclauss
Copy link
Contributor

cclauss commented Oct 18, 2021

Will this fix be in #2522 because it landed on Aug 30th in https://github.com/nodejs/gyp-next/releases/

@cclauss
Copy link
Contributor

cclauss commented Oct 19, 2021

Please confirm that this issue is fixed in https://github.com/nodejs/node-gyp/releases

@ShenHongFei
Copy link
Author

This issue is not fixed in node-gyp@8.3.0

node-gyp/lib/find-visualstudio.js#getSDK still returns null for Microsoft.VisualStudio.Component.Windows11SDK.22000 in info.packages because the pattern const win10SDKPrefix = 'Microsoft.VisualStudio.Component.Windows10SDK.' doesn't match.

Logs
```text
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   'e:\\sdk\\nodejs\\node.exe',
gyp verb cli   'd:\\0\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   '--loglevel=silly',
gyp verb cli   'configure'
gyp verb cli ]
gyp info using node-gyp@8.3.0
gyp info using node@16.11.1 | win32 | x64
gyp verb command configure []
gyp sill find Python runChecks: err = undefined
gyp verb find Python Python is not set from command line or npm configuration
gyp sill find Python runChecks: err = undefined
gyp verb find Python Python is not set from environment variable PYTHON
gyp sill find Python runChecks: err = undefined
gyp verb find Python checking if "python3" can be used
gyp verb find Python - executing "python3" to get executable path
gyp sill find Python execFile: exec = "\"python3\""
gyp sill find Python execFile: args = ["\"-c\"","\"import sys; print(sys.executable);\""]
gyp sill find Python execFile: opts = {"env":{"ZES_ENABLE_SYSMAN":"1","windir":"C:\\WINDOWS","USERPROFILE":"C:\\Users\\shf","USERNAME":"shf","USERDOMAIN_ROAMINGPROFILE":"SHF-LAPTOP","USERDOMAIN":"SHF-LAPTOP","TS_NODE_TYPE_CHECK":"0","TS_NODE_TRANSPILE_ONLY":"1","TMP":"C:\\Users\\shf\\AppData\\Local\\Temp","TEMP":"C:\\Users\\shf\\AppData\\Local\\Temp","SystemRoot":"C:\\WINDOWS","SystemDrive":"C:","PYTHONUTF8":"1","PUBLIC":"C:\\Users\\Public","PSModulePath":"%ProgramFiles%\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules","PSExecutionPolicyPreference":"Bypass","ProgramW6432":"C:\\Program Files","ProgramFiles(x86)":"C:\\Program Files (x86)","ProgramFiles":"C:\\Program Files","ProgramData":"C:\\ProgramData","PROCESSOR_REVISION":"8d01","PROCESSOR_LEVEL":"6","PROCESSOR_IDENTIFIER":"Intel64 Family 6 Model 141 Stepping 1, GenuineIntel","PROCESSOR_ARCHITECTURE":"AMD64","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW","Path":".\\;.\\node_modules\\.bin;C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\OpenSSH\\;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;e:\\sdk\\git\\cmd;e:\\sdk\\nodejs;C:\\Users\\shf\\AppData\\Roaming\\npm;e:\\sdk\\python\\Scripts\\;e:\\sdk\\python;C:\\Program Files\\dotnet\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Users\\shf\\AppData\\Local\\Microsoft\\WindowsApps;E:\\sdk\\nodejs\\;","OS":"Windows_NT","OneDriveConsumer":"C:\\Users\\shf\\OneDrive","OneDrive":"C:\\Users\\shf\\OneDrive","NUMBER_OF_PROCESSORS":"16","NO_UPDATE_NOTIFIER":"1","NODE_EXTRA_CA_CERTS":"d:/0/cfg/my-root-cas.pem","NODE_ENV":"development","LOGONSERVER":"\\\\SHF-LAPTOP","LOCALAPPDATA":"C:\\Users\\shf\\AppData\\Local","HOMEPATH":"\\Users\\shf","HOMEDRIVE":"C:","file.encoding":"UTF-8","DriverData":"C:\\Windows\\System32\\Drivers\\DriverData","configsetroot":"C:\\WINDOWS\\ConfigSetRoot","ConEmuWorkDrive":"d:","ConEmuWorkDir":"d:\\winax","ConEmuServerPID":"28984","ConEmuPID":"9420","ConEmuPalette":"<Current color scheme>","ConEmuIsAdmin":"ADMIN","ConEmuHWND":"0x0001032C","ConEmuHooks":"Enabled","ConEmuDrive":"C:","ConEmuDrawHWND":"0x001E1B64","ConEmuDir":"C:\\Program Files\\ConEmu","ConEmuConfig":"","ConEmuCfgDir":"C:\\Program Files\\ConEmu","ConEmuBuild":"210912","ConEmuBaseDirShort":"C:\\PROGRA~1\\ConEmu\\ConEmu","ConEmuBaseDir":"C:\\Program Files\\ConEmu\\ConEmu","ConEmuBackHWND":"0x002F1D50","ConEmuArgs2":"-","ConEmuArgs":"","ConEmuAnsiLog":"","ConEmuANSI":"ON","ComSpec":"C:\\WINDOWS\\system32\\cmd.exe","COMPUTERNAME":"SHF-LAPTOP","CommonProgramW6432":"C:\\Program Files\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files","CommonProgramFiles":"C:\\Program Files\\Common Files","APPDATA":"C:\\Users\\shf\\AppData\\Roaming","ANSICON_DEF":"7","ANSICON":"315x3000 (315x77)","ALLUSERSPROFILE":"C:\\ProgramData","TERM":"dumb"},"shell":true}
gyp sill find Python execFile result: err = "Error: Command failed: \"python3\" \"-c\" \"import sys; print(sys.executable);\"\nPython was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.\r\n\n    at ChildProcess.exithandler (node:child_process:397:12)\n    at ChildProcess.emit (node:events:390:28)\n    at maybeClose (node:internal/child_process:1064:16)\n    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)"
gyp sill find Python execFile result: stdout = ""
gyp sill find Python execFile result: stderr = "Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.\r\n"
gyp verb find Python - "python3" is not in PATH or produced an error
gyp sill find Python runChecks: err = "Error: Command failed: \"python3\" \"-c\" \"import sys; print(sys.executable);\"\nPython was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.\r\n\n    at ChildProcess.exithandler (node:child_process:397:12)\n    at ChildProcess.emit (node:events:390:28)\n    at maybeClose (node:internal/child_process:1064:16)\n    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)"
gyp verb find Python checking if "python" can be used
gyp verb find Python - executing "python" to get executable path
gyp sill find Python execFile: exec = "\"python\""
gyp sill find Python execFile: args = ["\"-c\"","\"import sys; print(sys.executable);\""]
gyp sill find Python execFile: opts = {"env":{"ZES_ENABLE_SYSMAN":"1","windir":"C:\\WINDOWS","USERPROFILE":"C:\\Users\\shf","USERNAME":"shf","USERDOMAIN_ROAMINGPROFILE":"SHF-LAPTOP","USERDOMAIN":"SHF-LAPTOP","TS_NODE_TYPE_CHECK":"0","TS_NODE_TRANSPILE_ONLY":"1","TMP":"C:\\Users\\shf\\AppData\\Local\\Temp","TEMP":"C:\\Users\\shf\\AppData\\Local\\Temp","SystemRoot":"C:\\WINDOWS","SystemDrive":"C:","PYTHONUTF8":"1","PUBLIC":"C:\\Users\\Public","PSModulePath":"%ProgramFiles%\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules","PSExecutionPolicyPreference":"Bypass","ProgramW6432":"C:\\Program Files","ProgramFiles(x86)":"C:\\Program Files (x86)","ProgramFiles":"C:\\Program Files","ProgramData":"C:\\ProgramData","PROCESSOR_REVISION":"8d01","PROCESSOR_LEVEL":"6","PROCESSOR_IDENTIFIER":"Intel64 Family 6 Model 141 Stepping 1, GenuineIntel","PROCESSOR_ARCHITECTURE":"AMD64","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW","Path":".\\;.\\node_modules\\.bin;C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\OpenSSH\\;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;e:\\sdk\\git\\cmd;e:\\sdk\\nodejs;C:\\Users\\shf\\AppData\\Roaming\\npm;e:\\sdk\\python\\Scripts\\;e:\\sdk\\python;C:\\Program Files\\dotnet\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Users\\shf\\AppData\\Local\\Microsoft\\WindowsApps;E:\\sdk\\nodejs\\;","OS":"Windows_NT","OneDriveConsumer":"C:\\Users\\shf\\OneDrive","OneDrive":"C:\\Users\\shf\\OneDrive","NUMBER_OF_PROCESSORS":"16","NO_UPDATE_NOTIFIER":"1","NODE_EXTRA_CA_CERTS":"d:/0/cfg/my-root-cas.pem","NODE_ENV":"development","LOGONSERVER":"\\\\SHF-LAPTOP","LOCALAPPDATA":"C:\\Users\\shf\\AppData\\Local","HOMEPATH":"\\Users\\shf","HOMEDRIVE":"C:","file.encoding":"UTF-8","DriverData":"C:\\Windows\\System32\\Drivers\\DriverData","configsetroot":"C:\\WINDOWS\\ConfigSetRoot","ConEmuWorkDrive":"d:","ConEmuWorkDir":"d:\\winax","ConEmuServerPID":"28984","ConEmuPID":"9420","ConEmuPalette":"<Current color scheme>","ConEmuIsAdmin":"ADMIN","ConEmuHWND":"0x0001032C","ConEmuHooks":"Enabled","ConEmuDrive":"C:","ConEmuDrawHWND":"0x001E1B64","ConEmuDir":"C:\\Program Files\\ConEmu","ConEmuConfig":"","ConEmuCfgDir":"C:\\Program Files\\ConEmu","ConEmuBuild":"210912","ConEmuBaseDirShort":"C:\\PROGRA~1\\ConEmu\\ConEmu","ConEmuBaseDir":"C:\\Program Files\\ConEmu\\ConEmu","ConEmuBackHWND":"0x002F1D50","ConEmuArgs2":"-","ConEmuArgs":"","ConEmuAnsiLog":"","ConEmuANSI":"ON","ComSpec":"C:\\WINDOWS\\system32\\cmd.exe","COMPUTERNAME":"SHF-LAPTOP","CommonProgramW6432":"C:\\Program Files\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files","CommonProgramFiles":"C:\\Program Files\\Common Files","APPDATA":"C:\\Users\\shf\\AppData\\Roaming","ANSICON_DEF":"7","ANSICON":"315x3000 (315x77)","ALLUSERSPROFILE":"C:\\ProgramData","TERM":"dumb"},"shell":true}
gyp sill find Python execFile result: err = null
gyp sill find Python execFile result: stdout = "e:\\sdk\\python\\python.exe\r\n"
gyp sill find Python execFile result: stderr = ""
gyp verb find Python - executable path is "e:\sdk\python\python.exe"
gyp verb find Python - executing "e:\sdk\python\python.exe" to get version
gyp sill find Python execFile: exec = "e:\\sdk\\python\\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":{"ZES_ENABLE_SYSMAN":"1","windir":"C:\\WINDOWS","USERPROFILE":"C:\\Users\\shf","USERNAME":"shf","USERDOMAIN_ROAMINGPROFILE":"SHF-LAPTOP","USERDOMAIN":"SHF-LAPTOP","TS_NODE_TYPE_CHECK":"0","TS_NODE_TRANSPILE_ONLY":"1","TMP":"C:\\Users\\shf\\AppData\\Local\\Temp","TEMP":"C:\\Users\\shf\\AppData\\Local\\Temp","SystemRoot":"C:\\WINDOWS","SystemDrive":"C:","PYTHONUTF8":"1","PUBLIC":"C:\\Users\\Public","PSModulePath":"%ProgramFiles%\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules","PSExecutionPolicyPreference":"Bypass","ProgramW6432":"C:\\Program Files","ProgramFiles(x86)":"C:\\Program Files (x86)","ProgramFiles":"C:\\Program Files","ProgramData":"C:\\ProgramData","PROCESSOR_REVISION":"8d01","PROCESSOR_LEVEL":"6","PROCESSOR_IDENTIFIER":"Intel64 Family 6 Model 141 Stepping 1, GenuineIntel","PROCESSOR_ARCHITECTURE":"AMD64","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW","Path":".\\;.\\node_modules\\.bin;C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\OpenSSH\\;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;e:\\sdk\\git\\cmd;e:\\sdk\\nodejs;C:\\Users\\shf\\AppData\\Roaming\\npm;e:\\sdk\\python\\Scripts\\;e:\\sdk\\python;C:\\Program Files\\dotnet\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Users\\shf\\AppData\\Local\\Microsoft\\WindowsApps;E:\\sdk\\nodejs\\;","OS":"Windows_NT","OneDriveConsumer":"C:\\Users\\shf\\OneDrive","OneDrive":"C:\\Users\\shf\\OneDrive","NUMBER_OF_PROCESSORS":"16","NO_UPDATE_NOTIFIER":"1","NODE_EXTRA_CA_CERTS":"d:/0/cfg/my-root-cas.pem","NODE_ENV":"development","LOGONSERVER":"\\\\SHF-LAPTOP","LOCALAPPDATA":"C:\\Users\\shf\\AppData\\Local","HOMEPATH":"\\Users\\shf","HOMEDRIVE":"C:","file.encoding":"UTF-8","DriverData":"C:\\Windows\\System32\\Drivers\\DriverData","configsetroot":"C:\\WINDOWS\\ConfigSetRoot","ConEmuWorkDrive":"d:","ConEmuWorkDir":"d:\\winax","ConEmuServerPID":"28984","ConEmuPID":"9420","ConEmuPalette":"<Current color scheme>","ConEmuIsAdmin":"ADMIN","ConEmuHWND":"0x0001032C","ConEmuHooks":"Enabled","ConEmuDrive":"C:","ConEmuDrawHWND":"0x001E1B64","ConEmuDir":"C:\\Program Files\\ConEmu","ConEmuConfig":"","ConEmuCfgDir":"C:\\Program Files\\ConEmu","ConEmuBuild":"210912","ConEmuBaseDirShort":"C:\\PROGRA~1\\ConEmu\\ConEmu","ConEmuBaseDir":"C:\\Program Files\\ConEmu\\ConEmu","ConEmuBackHWND":"0x002F1D50","ConEmuArgs2":"-","ConEmuArgs":"","ConEmuAnsiLog":"","ConEmuANSI":"ON","ComSpec":"C:\\WINDOWS\\system32\\cmd.exe","COMPUTERNAME":"SHF-LAPTOP","CommonProgramW6432":"C:\\Program Files\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files","CommonProgramFiles":"C:\\Program Files\\Common Files","APPDATA":"C:\\Users\\shf\\AppData\\Roaming","ANSICON_DEF":"7","ANSICON":"315x3000 (315x77)","ALLUSERSPROFILE":"C:\\ProgramData","TERM":"dumb"},"shell":false}
gyp sill find Python execFile result: err = null
gyp sill find Python execFile result: stdout = "3.10.0\r\n"
gyp sill find Python execFile result: stderr = ""
gyp verb find Python - version is "3.10.0"
gyp info find Python using Python version 3.10.0 found at "e:\sdk\python\python.exe"
gyp verb get node dir no --target version specified, falling back to host node version: 16.11.1
gyp verb command install [ '16.11.1' ]
gyp verb install input version string "16.11.1"
gyp verb install installing version: 16.11.1
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" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 16.11.1
gyp verb build dir attempting to create "build" dir: d:\winax\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 'd:\\0\\node_modules\\node-gyp\\lib\\Find-VisualStudio.cs';[VisualStudioConfiguration.Main]::PrintJson()}"
gyp sill find VS ]
gyp sill find VS PS stderr = ""
gyp sill find VS processing installation: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp sill find VS - version match = ["16.11.31729.503","16","11"]
gyp sill find VS - found VC.MSBuild.Base
gyp sill find VS - found VC.Tools.x86.x64
gyp sill find VS vsInfo: [
gyp sill find VS   {
gyp sill find VS     version: '16.11.31729.503',
gyp sill find VS     versionMajor: 16,
gyp sill find VS     versionMinor: 11,
gyp sill find VS     versionYear: 2019,
gyp sill find VS     path: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community',
gyp sill find VS     msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe',
gyp sill find VS     toolset: 'v142',
gyp sill find VS     sdk: null
gyp sill find VS   }
gyp sill find VS ]
gyp verb find VS checking VS2019 (16.11.31729.503) found at:
gyp verb find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp verb find VS - found "Visual Studio C++ core features"
gyp verb find VS - found VC++ toolset: v142
gyp verb find VS - missing any Windows SDK
gyp verb find VS could not find a version of Visual Studio 2017 or newer to use
gyp verb find VS looking for Visual Studio 2015
gyp sill reg-search looking for "14.0" in "HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7"
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\n����: ϵͳ�Ҳ���ָ����ע������ֵ��\r\n\n    at ChildProcess.exithandler (node:child_process:397:12)\n    at ChildProcess.emit (node:events:390:28)\n    at
 maybeClose (node:internal/child_process:1064:16)\n    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)"
gyp sill reg reg.exe stderr = "����: ϵͳ�Ҳ���ָ����ע������ֵ��\r\n"
gyp sill reg-search looking for "14.0" in "HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7"
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\n����: ϵͳ�Ҳ���ָ����ע������ֵ��\r\n\n    at ChildProcess.exithandler (node:child_process:397:12)\n    at ChildProcess.emit (node:events:39
0:28)\n    at maybeClose (node:internal/child_process:1064:16)\n    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)"
gyp sill reg reg.exe stderr = "����: ϵͳ�Ҳ���ָ����ע������ֵ��\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 checking VS2019 (16.11.31729.503) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - found VC++ toolset: v142
gyp ERR! find VS - missing any Windows SDK
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
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 (d:\0\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack     at d:\0\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (d:\0\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack     at d:\0\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack     at d:\0\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack     at d:\0\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at d:\0\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:404:5)
gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1064:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "e:\\sdk\\nodejs\\node.exe" "d:\\0\\node_modules\\node-gyp\\bin\\node-gyp.js" "--loglevel=silly" "configure"
gyp ERR! cwd d:\winax
gyp ERR! node -v v16.11.1
gyp ERR! node-gyp -v v8.3.0
gyp ERR! not ok
```

@TDiblik
Copy link

TDiblik commented Nov 16, 2021

Hi, I think this issue still persists, I experienced it after upgrading to Windows11 && Visual Studio 2022.
I am using a package called node-sass. that uses this package, however I am convinced that original error is cause by node-gyp. I have installed all requirements as described at installation guide.

Full output:

error C:\Users\TomDibla\Downloads\dir\src\main\webapp\node_modules\node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: C:\Users\TomDibla\Downloads\dir\src\main\webapp\node_modules\node-sass
Output:
Building: C:\Program Files\nodejs\node.exe C:\Users\TomDibla\Downloads\dir\src\main\webapp\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
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\\TomDibla\\Downloads\\dir\\src\\main\\webapp\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using node-gyp@7.1.2
gyp info using node@16.5.0 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
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 "python3" can be used
gyp verb find Python - executing "python3" to get executable path
gyp verb find Python - "python3" is not in PATH or produced an error
gyp verb find Python checking if "python" can be used
gyp verb find Python - executing "python" to get executable path
gyp verb find Python - executable path is "C:\Users\TomDibla\AppData\Local\Programs\Python\Python38\python.exe"
gyp verb find Python - executing "C:\Users\TomDibla\AppData\Local\Programs\Python\Python38\python.exe" to get version
gyp verb find Python - version is "3.8.1"
gyp info find Python using Python version 3.8.1 found at "C:\Users\TomDibla\AppData\Local\Programs\Python\Python38\python.exe"
gyp verb get node dir no --target version specified, falling back to host node version: 16.5.0
gyp verb command install [ '16.5.0' ]
gyp verb install input version string "16.5.0"
gyp verb install installing version: 16.5.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" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 16.5.0
gyp verb build dir attempting to create "build" dir: C:\Users\TomDibla\Downloads\dir\src\main\webapp\node_modules\node-sass\build
gyp verb build dir "build" dir needed to be created? C:\Users\TomDibla\Downloads\dir\src\main\webapp\node_modules\node-sass\build
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 verb find VS unknown version "undefined" found at "C:\Program Files\Microsoft Visual Studio\2022\Community"
gyp verb find VS could not find a version of Visual Studio 2017 or newer to use
gyp verb find VS looking for Visual Studio 2015
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 unknown version "undefined" found at "C:\Program Files\Microsoft Visual Studio\2022\Community"
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
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\TomDibla\Downloads\dir\src\main\webapp\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack     at C:\Users\TomDibla\Downloads\dir\src\main\webapp\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\TomDibla\Downloads\dir\src\main\webapp\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack     at C:\Users\TomDibla\Downloads\dir\src\main\webapp\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack     at C:\Users\TomDibla\Downloads\dir\src\main\webapp\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack     at C:\Users\TomDibla\Downloads\dir\src\main\webapp\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Users\TomDibla\Downloads\dir\src\main\webapp\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:404:5)
gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\TomDibla\\Downloads\\dir\\src\\main\\webapp\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\TomDibla\Downloads\dir\src\main\webapp\node_modules\node-sass
gyp ERR! node -v v16.5.0```

@cclauss cclauss added the Node Sass --> Dart Sass https://github.com/sass/node-sass/issues/2952 label Nov 16, 2021
@cclauss
Copy link
Contributor

cclauss commented Nov 16, 2021

gyp info using node-gyp@7.1.2

Not up to date.

node-sass is deprecated so we cannot offer support for it.

@cclauss
Copy link
Contributor

cclauss commented Nov 16, 2021

@ShenHongFei Please try again on v8.4.0

node-gyp v8.4.0

Features

@ShenHongFei
Copy link
Author

@cclauss This issue is successfully fixed in node-gyp v8.4.0.
Thank you so much 👍

@NyaomiDEV
Copy link

NyaomiDEV commented Nov 28, 2021

This is not fixed at all. Node-gyp won't compile using the Windows 11 SDK because the code doesn't check for the Microsoft.VisualStudio.Component.Windows11SDK.22000 package.

I request this issue to be reopened.

Relevant info:

const win10SDKPrefix = 'Microsoft.VisualStudio.Component.Windows10SDK.'

@cclauss
Copy link
Contributor

cclauss commented Nov 28, 2021

Please look in your logs for the version of node-gyp is running.

@NyaomiDEV
Copy link

Please look in your logs for the version of node-gyp is running.

8.4.0, of course! I do use VS2022

@cclauss
Copy link
Contributor

cclauss commented Nov 28, 2021

The current version is v8.4.1. Please provide the command typed and the full logs.

@NyaomiDEV
Copy link

The current version is v8.4.1. Please provide the command typed and the full logs.

While I do understand your request, I must say, it is clear as day that the code will not find the Windows 11 SDK because the package prefix changed a 10 into an 11 as I already said; but it won't prevent building on Windows 11 because, as of right now, the Windows 10 SDK is still installed by default when people install the "Desktop development with C++" or "Visual C++ build tools" workloads. In fact, I was building just fine and I caused myself this problem when I uninstalled my copy of the Windows 10 SDK because I felt like upgrading to the Windows 11 one.

Full logs and commands typed are, therefore, useless to this scope. You could run your lib/Find-VisualStudio.cs file like the project does and then try to find the Windows 10 package prefix to ultimately notice that it is gone on an installation that only provides the Windows 11 SDK. (I did this to notice the shortcoming)

But, with patience, I will upgrade to the latest node-gyp and post the full logs in the coming days.

@i-C-o-d-e-r
Copy link
Contributor

i-C-o-d-e-r commented Dec 6, 2021

I can also confirm that this issue is not fixed for me. Here is the full output (where you can see the command typed and the full log of the generated output) using node-gyp@8.4.1 and node@16.13.0:

npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp-build || npm run build:libzmq
npm ERR! > zeromq@5.2.8 build:libzmq
npm ERR! > node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@16.13.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.0 found at "C:\Program Files\Python\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version was set from command line or npm config
npm ERR! gyp ERR! find VS - looking for Visual Studio version 2022
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2022 (17.0.31919.166) found at:
npm ERR! gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Professional"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - found VC++ toolset: v143
npm ERR! gyp ERR! find VS - missing any Windows SDK
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS valid versions for msvs_version:
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack at C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:404:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! System Windows_NT 10.0.22000
npm ERR! gyp ERR! command "C:\Program Files\NodeJS\node.exe" "C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\my<...snip...>\node_modules\zeromq
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@16.13.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.0 found at "C:\Program Files\Python\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version was set from command line or npm config
npm ERR! gyp ERR! find VS - looking for Visual Studio version 2022
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2022 (17.0.31919.166) found at:
npm ERR! gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Professional"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - found VC++ toolset: v143
npm ERR! gyp ERR! find VS - missing any Windows SDK
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS valid versions for msvs_version:
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack at C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:404:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! System Windows_NT 10.0.22000
npm ERR! gyp ERR! command "C:\Program Files\NodeJS\node.exe" "C:\Users\my\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\my<...snip...>\node_modules\zeromq
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok

Hope this helps to fix it.

@cclauss
Copy link
Contributor

cclauss commented Dec 6, 2021

Did you npm config set msvs_version 2022 as discussed at:
https://github.com/nodejs/node-gyp/blob/master/README.md#on-windows

@i-C-o-d-e-r
Copy link
Contributor

Yes I did. Here is the extract from my .npmrc file:

msvs_version=2022

I agree to @NyaomiDEV that this is not a problem of MSVS, but a problem of the Windows SDK. MSVS 2022 is found, but the latest Windows SDK for Windows 11 is not detected as the log output clearly states:

  • found "Visual Studio C++ core features"
  • found VC++ toolset: v143
  • missing any Windows SDK

When I install the latest Windows SDK for Windows 10, everything works as expected.

@cclauss
Copy link
Contributor

cclauss commented Dec 6, 2021

A pull request to fix this would be warmly received.

@i-C-o-d-e-r
Copy link
Contributor

@cclauss Would you please reopen this issue?

I am working on a pull request now.

@manjumallesh678
Copy link

When I run npm install facing same issue with new versions, Any one please help.
I have installed vs 2017 and 2022
And also tried npm config set msvs_version 2022

npm ERR! path E:\web development\skuad\talent-view-service\node_modules\node-rdkafka
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.15.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.4 found at "C:\Users\manju\AppData\Local\Microsoft\WindowsApps\Pyth\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS running in VS Command Prompt, installation path is:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2022"
npm ERR! gyp ERR! find VS - will only use this version
npm ERR! gyp ERR! find VS checking VS2022 (17.2.32519.379) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - found VC++ toolset: v143
npm ERR! gyp ERR! find VS - found Windows SDK: 10.0.19041.0
npm ERR! gyp ERR! find VS - does not match this Visual Studio Command Prompt
npm ERR! gyp ERR! find VS checking VS2017 (15.9.28307.1974) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - found VC++ toolset: v141
npm ERR! gyp ERR! find VS - found Windows SDK: 10.0.17763.0
npm ERR! gyp ERR! find VS - does not match this Visual Studio Command Prompt
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
pm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Users\manju\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Users\manju\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:406:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\manju\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd E:\web development\skuad\talent-view-service\node_modules\node-rdkafka
npm ERR! gyp ERR! node -v v16.15.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok

Debenben added a commit to Debenben/noble that referenced this issue Nov 20, 2022
this fixes missing SDK build error on windows
see nodejs/node-gyp#2527
rzr pushed a commit to abandonware/noble that referenced this issue Nov 21, 2022
this fixes missing SDK build error on windows
see nodejs/node-gyp#2527
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Node Sass --> Dart Sass https://github.com/sass/node-sass/issues/2952 Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants