mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
fix: remote folder compilation on macOS with node.js v20.18.0 (#231928)
* fix: remote folder compilation on macOS with node.js v20.18.0 * chore: update debian deps * chore: update rpm deps
This commit is contained in:
@@ -76,6 +76,20 @@ function setNpmrcConfig(dir, env) {
|
||||
}
|
||||
}
|
||||
|
||||
// Force node-gyp to use process.config on macOS
|
||||
// which defines clang variable as expected. Otherwise we
|
||||
// run into compilation errors due to incorrect compiler
|
||||
// configuration.
|
||||
// NOTE: This means the process.config should contain
|
||||
// the correct clang variable. So keep the version check
|
||||
// in preinstall sync with this logic.
|
||||
// Change was first introduced in https://github.com/nodejs/node/commit/6e0a2bb54c5bbeff0e9e33e1a0c683ed980a8a0f
|
||||
if (dir === 'remote' && process.platform === 'darwin') {
|
||||
env['npm_config_force_process_config'] = 'true';
|
||||
} else {
|
||||
delete env['npm_config_force_process_config'];
|
||||
}
|
||||
|
||||
if (dir === 'build') {
|
||||
env['npm_config_target'] = process.versions.node;
|
||||
env['npm_config_arch'] = process.arch;
|
||||
|
||||
@@ -9,8 +9,8 @@ const minorNodeVersion = parseInt(nodeVersion[2]);
|
||||
const patchNodeVersion = parseInt(nodeVersion[3]);
|
||||
|
||||
if (!process.env['VSCODE_SKIP_NODE_VERSION_CHECK']) {
|
||||
if (majorNodeVersion < 20) {
|
||||
console.error('\x1b[1;31m*** Please use latest Node.js v20 LTS for development.\x1b[0;0m');
|
||||
if (majorNodeVersion < 20 || (majorNodeVersion === 20 && minorNodeVersion < 18)) {
|
||||
console.error('\x1b[1;31m*** Please use Node.js v20.18.0 or later for development.\x1b[0;0m');
|
||||
throw new Error();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user