Skip to content

Commit 1639731

Browse files
tybookcursoragent
andauthored
fix: pre-download node-gyp headers to avoid install race condition (#2672)
## Summary - Adds `npx node-gyp install` before every `yarn install` in CI workflows - This pre-downloads Node.js headers so that multiple native addon compilations during `yarn install` don't race to download the same headers simultaneously ## Files changed - `.github/workflows/ci.yml` - added `npx node-gyp install` before `yarn install` - `.github/workflows/release-packages.yml` - added `npx node-gyp install` before `yarn install` <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on updating the installation process for dependencies in continuous integration workflows and modifying the version of `node-gyp` used in the project. ### Detailed summary - In `.github/workflows/ci.yml`: - Changed the installation command to use `npx node-gyp@12.2.0 install` before `yarn install`. - Updated the `node-gyp` version in `packages/core/package.json` from `^9.4.0` to `12.2.0`. - In `.github/workflows/release-packages.yml`: - Similar changes to the installation command as in `ci.yml`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 305aef8 commit 1639731

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ jobs:
6868
uses: foundry-rs/foundry-toolchain@v1
6969

7070
- name: Install dependencies
71-
run: yarn install
71+
run: |
72+
npx node-gyp@12.2.0 install
73+
yarn install
7274
7375
- name: Run build
7476
run: yarn build

.github/workflows/release-packages.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ jobs:
2929
key: ${{ runner.os }}--node--${{ hashFiles('**/yarn.lock') }}
3030

3131
- name: Install dependencies
32-
run: yarn install
32+
run: |
33+
npx node-gyp@12.2.0 install
34+
yarn install
3335
3436
- name: Create Release Pull Request or Publish to npm
3537
id: changesets

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"biome-config-custom": "*",
4646
"ethers": "^6.6.1",
4747
"ethers5": "npm:ethers@^5.7.0",
48-
"node-gyp": "^9.4.0",
48+
"node-gyp": "12.2.0",
4949
"prettier-config-custom": "*",
5050
"ts-proto": "^1.146.0"
5151
}

0 commit comments

Comments
 (0)