Skip to content

Windows 11 SDK (10.0.22000) is not supported #2527

@ShenHongFei

Description

@ShenHongFei
  • 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 [email protected]
235 error gyp info using [email protected] | 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions