nodejs/node · error · GypError
%s requires any SDK of %s version, but none were found
Error message
%s requires any SDK of %s version, but none were found
What it means
Raised as a GypError during MSBuild project generation when no installed Windows SDK matches the version required by the configured MSVS toolchain. The generator iterates configurations looking for a WindowsTargetPlatformVersion; if none resolves and the toolchain declares compatible_sdks, it errors because the build cannot proceed without an SDK.
Source
Thrown at tools/gyp/pylib/gyp/generator/msvs.py:2986
else:
properties[0].append(["ApplicationType", "Windows Store"])
platform_name = None
msvs_windows_sdk_version = None
for configuration in spec["configurations"].values():
platform_name = platform_name or _ConfigPlatform(configuration)
msvs_windows_sdk_version = (
msvs_windows_sdk_version
or _ConfigWindowsTargetPlatformVersion(configuration, version)
)
if platform_name and msvs_windows_sdk_version:
break
if msvs_windows_sdk_version:
properties[0].append(
["WindowsTargetPlatformVersion", str(msvs_windows_sdk_version)]
)
elif version.compatible_sdks:
raise GypError(
"%s requires any SDK of %s version, but none were found"
% (version.description, version.compatible_sdks)
)
if platform_name == "ARM":
properties[0].append(["WindowsSDKDesktopARMSupport", "true"])
return properties
def _GetMSBuildConfigurationDetails(spec, build_file):
properties = {}
for name, settings in spec["configurations"].items():
msbuild_attributes = _GetMSBuildAttributes(spec, settings, build_file)
condition = _GetConfigurationCondition(name, settings, spec)
character_set = msbuild_attributes.get("CharacterSet")
vctools_version = msbuild_attributes.get("VCToolsVersion")
config_type = msbuild_attributes.get("ConfigurationType")View on GitHub (pinned to 1b2de5e052)
Solutions
- Install a Windows SDK matching the version.compatible_sdks requirement (shown in the message).
- Pin the msvs_version / WindowsTargetPlatformVersion to an SDK that is installed.
- On CI, add the required SDK to the image or install it in the setup step.
- Verify with `reg query` or the installed SDKs list that the expected version is present.
Example fix
# before — machine lacks the SDK for the default msvs version gyp --depth=. -f msvs -Gmsvs_version=2022 # after — install matching SDK, or pin to installed version gyp --depth=. -f msvs -Gmsvs_version=2022 -Gmsvs_windows_target_platform_version=10.0.20348.0
Defensive patterns
Strategy: validation
Validate before calling
import subprocess
r = subprocess.run(['reg','query',r'HKLM\SOFTWARE\Microsoft\Windows Kits\Installed Roots'], capture_output=True, text=True)
if 'Windows Kits' not in r.stdout:
raise EnvironmentError('no Windows SDK installed') Prevention
- Install the Windows SDK version matching your msvs_version.
- Pin WindowsTargetPlatformVersion to an installed SDK.
- Add the SDK to CI images.
When it happens
Trigger: Generating MSBuild projects with an MSVS version that declares compatible_sdks, on a machine where none of those SDK versions are installed, and no msvs_windows_target_platform_version is explicitly set. Falls through to the `elif version.compatible_sdks` branch at msvs.py:2986.
Common situations: Fresh CI/dev machine without the Windows SDK installed; upgrading the MSVS toolchain version without installing the matching SDK; targeting a Windows SDK that was uninstalled; mismatch between the gyp-configured msvs_version and the installed SDKs.
Related errors
- %s is missing - make sure VC++ tools are installed.
- Environment variable "%s" required to be set to valid path
- expected bool; got %r
- converted value for %s not specified.
- value must be one of [0, 1, 2]; got %s
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/c35db6374a79a5da.
Report an issue: GitHub.