From d17c249fc6895f78bbeaa4b05418cc0f9f6e8f62 Mon Sep 17 00:00:00 2001 From: Musiker15 Date: Sun, 21 Jun 2026 20:50:22 +0200 Subject: [PATCH] chore(deploy): clean .next before build to avoid stale standalone chunks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The deploy built on top of the previous `.next`, so an interrupted/partial build could leave the standalone output referencing a server chunk that was never re-emitted — the `ChunkLoadError` (e.g. for `_global-error/page.js`) seen in production. Remove `apps/web/.next` before `pnpm run build` so each deploy produces a pristine standalone bundle. (A clean local build shows no chunk is actually missing; this prevents the stale-state class of failure.) --- .github/workflows/deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f7a9ebd..0cb2254 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -48,7 +48,8 @@ jobs: pnpm prisma migrate deploy pnpm prisma generate - echo "-> Build" + echo "-> Build (clean .next first to avoid stale standalone chunks)" + rm -rf apps/web/.next pnpm run build echo "-> Reload services via PM2 (zero-downtime)"