From c3e948aa30f54b0ad20f1a99627949cda4ad0c9f Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 2 Mar 2022 10:16:53 +0900 Subject: [PATCH] ci: fix build with latest node-gyp --- .github/workflows/ci.yml | 4 ++++ build/azure-pipelines/darwin/product-build-darwin.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f191223bee..1d32108e047 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,6 +64,10 @@ jobs: # Remove this once node-version > 17.4.x or > 16.14.0, # which ships with npm > 8.4.0 that has support for VS 2022 toolchain. $env:npm_config_node_gyp=$(Join-Path $(Get-Command node-gyp.cmd).Path "..\node_modules\node-gyp\bin\node-gyp.js" -Resolve) + # Electron <= 13 does not ship with correct config.gypi headers, + # remove this once we update to newer versions. + # Refs https://github.com/nodejs/node-gyp/pull/2497 + $env:npm_config_force_process_config=true yarn --frozen-lockfile --network-timeout 180000 - name: Create node_modules archive if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} diff --git a/build/azure-pipelines/darwin/product-build-darwin.yml b/build/azure-pipelines/darwin/product-build-darwin.yml index 375da9de1b7..585676c9835 100644 --- a/build/azure-pipelines/darwin/product-build-darwin.yml +++ b/build/azure-pipelines/darwin/product-build-darwin.yml @@ -79,6 +79,10 @@ steps: set -e export npm_config_arch=$(VSCODE_ARCH) export npm_config_node_gyp=$(which node-gyp) + # Electron <= 13 does not ship with correct config.gypi headers, + # remove this once we update to newer versions. + # Refs https://github.com/nodejs/node-gyp/pull/2497 + export npm_config_force_process_config=true for i in {1..3}; do # try 3 times, for Terrapin yarn --frozen-lockfile && break