diff --git a/build/npm/preinstall.js b/build/npm/preinstall.js index 9bd9d39a0b73f..a93a91855c6c9 100644 --- a/build/npm/preinstall.js +++ b/build/npm/preinstall.js @@ -63,6 +63,17 @@ function hasSupportedVisualStudioVersion() { break; } const programFiles86Path = process.env['ProgramFiles(x86)']; + const programFiles64Path = process.env['ProgramFiles']; + + if (programFiles64Path) { + vsPath = `${programFiles64Path}/Microsoft Visual Studio/${version}`; + const vsTypes = ['Enterprise', 'Professional', 'Community', 'Preview', 'BuildTools']; + if (vsTypes.some(vsType => fs.existsSync(path.join(vsPath, vsType)))) { + availableVersions.push(version); + break; + } + } + if (programFiles86Path) { vsPath = `${programFiles86Path}/Microsoft Visual Studio/${version}`; const vsTypes = ['Enterprise', 'Professional', 'Community', 'Preview', 'BuildTools'];