question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows 11 SDK (10.0.22000) is not supported

See original GitHub issue
  • 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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
NyaomiDEVcommented, Nov 28, 2021

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.

3reactions
cclausscommented, Nov 16, 2021

@ShenHongFei Please try again on v8.4.0

node-gyp v8.4.0

Features

  • build with config.gypi from node headers (a27dc08)
  • support vs2022 (#2533) (5a00387)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows SDK - Microsoft Developer
The Windows SDK for Windows 11 contains headers, libraries, and tools you can use when you create apps that run on Windows.
Read more >
PackageId:Win11SDK_10.0.22000;PackageAction:Install
I read the warning about this (VS on Windows ARM) being not fully supported workflow, but if I download the SDK installer separately...
Read more >
1721208 - Fails to build with Windows 11 SDK (10.0.22000.194)
Bug 1721208 - Added a preprocessor #define for the CPU architecture in created .res files to resolve a build breakwith with Windows SDK...
Read more >
windows - Difference between 10.0.19041 and 10.0.22000 SDK
It's also true, 10.0.22000 SDK is for Windows 11. Let's have a look from a user perspective: When you download software, how often...
Read more >
Windows SDK for Windows 11
The Windows SDK for Windows 11 (10.0.22000) is now available for download, and is offered as an optional component in Visual Studio 2019 ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found