From 2b949f9d4b3bdb25d3ae9375f0bc1a03240e69a0 Mon Sep 17 00:00:00 2001 From: heggria Date: Mon, 6 Jul 2026 20:39:04 +0800 Subject: [PATCH] fix(website): retry npm ci to dodge 'Exit handler never called!' crash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit npm ci intermittently crashes with 'Exit handler never called!' — a known npm bug under GitHub Actions runner memory pressure (8-min download then segfault). Retry up to 3 times with backoff, falling back to npm install which is more tolerant of lockfile state. --- .github/workflows/deploy-website.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml index f2d95f9..e1b3071 100644 --- a/.github/workflows/deploy-website.yml +++ b/.github/workflows/deploy-website.yml @@ -42,7 +42,21 @@ jobs: - name: Install dependencies working-directory: website - run: npm ci --ignore-scripts + run: | + # npm ci intermittently crashes with "Exit handler never called!" + # (a known npm bug under runner memory pressure). Retry up to 3 times, + # falling back to `npm install` which is more tolerant of lockfile + # state. --ignore-scripts avoids running postinstall (prepare-source + # runs the build steps explicitly below). + for i in 1 2 3; do + if npm ci --ignore-scripts; then break; fi + echo "npm ci attempt $i failed; retrying in 10s…" + sleep 10 + if [ "$i" = "3" ]; then + echo "npm ci failed 3 times; falling back to npm install" + npm install --ignore-scripts + fi + done - name: Generate MDX source working-directory: website