We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentd9a26cc commitbfc8faeCopy full SHA for bfc8fae
packages/node-smol-builder/scripts/build.mjs
@@ -1452,11 +1452,20 @@ async function main() {
1452
// propagate environment variables to subprocesses.
1453
constexecOptions={
1454
cwd:NODE_DIR,
1455
-env:process.env,
+env:WIN32
1456
+ ?{
1457
+ ...process.env,
1458
+// Tell gyp to use VS 2022, bypassing auto-detection.
1459
+// https://github.com/nodejs/node/blob/main/BUILDING.md#windows
1460
+// https://github.com/nodejs/node/blob/main/tools/gyp/pylib/gyp/MSVSVersion.py
1461
+GYP_MSVS_VERSION:'2022',
1462
+}
1463
+ :process.env,
1464
shell:false,
1465
}
1466
if(WIN32){
-logger.log(`DEBUG: Passing env with${Object.keys(process.env).length} variables (shell: false)`)
1467
+logger.log(`DEBUG: Passing env with${Object.keys(execOptions.env).length} variables (shell: false)`)
1468
+logger.log(`DEBUG: GYP_MSVS_VERSION =${execOptions.env.GYP_MSVS_VERSION}`)
1469
1470
1471
awaitexec(configureCommand,configureArgs,execOptions)