diff --git a/.github/actions/nodejs/action.yaml b/.github/actions/nodejs/action.yaml index 537c402977a..ef62f30be32 100644 --- a/.github/actions/nodejs/action.yaml +++ b/.github/actions/nodejs/action.yaml @@ -5,7 +5,12 @@ inputs: node-version: description: "Node.js version to use" required: false - default: "24" + # Pinned: Node 24.15.0 shipped a regression in the ESM loader's + # CJS translation path that raises `EBADF: bad file descriptor, + # fstat` in getSourceSync -> readFileSync during postinstall + # scripts of native packages (bufferutil, utf-8-validate, + # unrs-resolver, @pshenmic/zeromq). 24.14.1 is unaffected. + default: "24.14.1" runs: using: composite steps: @@ -34,4 +39,13 @@ runs: - name: Install dependencies shell: bash - run: yarn install --inline-builds + run: | + for attempt in 1 2 3; do + if yarn install --inline-builds; then + exit 0 + fi + echo "::warning::yarn install failed on attempt ${attempt}, retrying..." + sleep $((attempt * 5)) + done + echo "::error::yarn install failed after 3 attempts" + exit 1