Skip to content

Commit 21e108e

Browse files
SchenLongclaude
andcommitted
ci: workaround npm/cli#4828 for Next build native bindings
The e2e-pr, visual-regression, and e2e-prod jobs build dojolm-web via `next build`, which loads `next/font` and the @next/swc native binding. CI intermittently fails with "Cannot find native binding" because npm ci skips some platform-specific optional deps (upstream bug npm/cli#4828). The tests job is unaffected because vitest was patched separately to bypass PostCSS. Add an `npm install --no-save` step after `npm ci` that explicitly pulls the Linux x64 gnu bindings for @next/swc, lightningcss, and @tailwindcss/oxide. `|| true` keeps the step non-blocking if a package already resolved correctly. --no-save means the lockfile is not touched. Long-term fix: regenerate package-lock.json locally on Linux to guarantee platform native deps are recorded, or switch CI to an install pattern that handles optional deps reliably. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 912a091 commit 21e108e

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,9 @@ jobs:
280280
- name: Install dependencies
281281
run: npm ci
282282

283+
- name: Install platform-specific native bindings (npm/cli#4828)
284+
run: cd packages/dojolm-web && npm install --no-save @next/swc-linux-x64-gnu lightningcss-linux-x64-gnu @tailwindcss/oxide-linux-x64-gnu || true
285+
283286
- name: Install Playwright browsers
284287
run: cd packages/dojolm-web && npx playwright install chromium --with-deps
285288

@@ -294,7 +297,8 @@ jobs:
294297
path: packages/dojolm-web/playwright-report/
295298
retention-days: 14
296299

297-
# ============================================
300+
# ========# added 3 rebuild steps
301+
====================================
298302
# Visual Regression Gate
299303
# ============================================
300304
visual-regression:
@@ -316,6 +320,9 @@ jobs:
316320
- name: Install dependencies
317321
run: npm ci
318322

323+
- name: Install platform-specific native bindings (npm/cli#4828)
324+
run: cd packages/dojolm-web && npm install --no-save @next/swc-linux-x64-gnu lightningcss-linux-x64-gnu @tailwindcss/oxide-linux-x64-gnu || true
325+
319326
- name: Install Playwright browsers
320327
run: cd packages/dojolm-web && npx playwright install chromium --with-deps
321328

@@ -357,6 +364,9 @@ jobs:
357364
- name: Install dependencies
358365
run: npm ci
359366

367+
- name: Install platform-specific native bindings (npm/cli#4828)
368+
run: cd packages/dojolm-web && npm install --no-save @next/swc-linux-x64-gnu lightningcss-linux-x64-gnu @tailwindcss/oxide-linux-x64-gnu || true
369+
360370
- name: Install Playwright browsers
361371
run: cd packages/dojolm-web && npx playwright install chromium --with-deps
362372

0 commit comments

Comments
 (0)