From 9b29e85e0c917ffc957adff544112c636941777c Mon Sep 17 00:00:00 2001 From: Robo Date: Thu, 15 Aug 2024 10:17:39 +0900 Subject: [PATCH] fix: install scripts for windows arm64 target (#225629) --- build/.cachesalt | 2 +- build/npm/postinstall.js | 5 ----- build/npm/preinstall.js | 14 +------------- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/build/.cachesalt b/build/.cachesalt index af13febe516ab..58a1efc163279 100644 --- a/build/.cachesalt +++ b/build/.cachesalt @@ -1 +1 @@ -2024-08-08T03:47:49.879Z +2024-08-14T18:12:43.548Z diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js index d45d5bc8cbc94..9ca239e3253b2 100644 --- a/build/npm/postinstall.js +++ b/build/npm/postinstall.js @@ -81,11 +81,6 @@ for (let dir of dirs) { } } - if (/^(.build\/distro\/npm\/)?remote/.test(dir) && process.platform === 'win32' && (process.arch === 'arm64' || process.env['npm_config_arch'] === 'arm64')) { - // windows arm: do not execute `yarn` on remote folder - continue; - } - let opts; if (dir === 'build') { diff --git a/build/npm/preinstall.js b/build/npm/preinstall.js index 7c51e83ff9c98..f359215ec8e06 100644 --- a/build/npm/preinstall.js +++ b/build/npm/preinstall.js @@ -122,19 +122,7 @@ function installHeaders() { cp.execFileSync(node_gyp, ['install', '--dist-url', local.disturl, local.target], { shell: true }); } - // Avoid downloading headers for Windows arm64 till we move to Nodejs v19 in remote - // which is the first official release with support for the architecture. Downloading - // the headers for older versions now redirect to https://origin.nodejs.org/404.html - // which causes checksum validation error in node-gyp. - // - // gyp http 200 https://origin.nodejs.org/404.html - // gyp WARN install got an error, rolling back install - // gyp ERR! install error - // gyp ERR! stack Error: win-arm64/node.lib local checksum 4c62bed7a032f7b36984321b7ffdd60b596fac870672037ff879ae9ac9548fb7 not match remote undefined - // - if (remote !== undefined && !versions.has(remote.target) && - process.env['npm_config_arch'] !== "arm64" && - process.arch !== "arm64") { + if (remote !== undefined && !versions.has(remote.target)) { // Both disturl and target come from a file checked into our repository cp.execFileSync(node_gyp, ['install', '--dist-url', remote.disturl, remote.target], { shell: true }); }