ci: fix build with latest node-gyp

This commit is contained in:
deepak1556
2022-03-02 10:16:53 +09:00
parent 1900abc88b
commit c3e948aa30
2 changed files with 8 additions and 0 deletions

View File

@@ -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' }}

View File

@@ -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