Skip to content

chore(deploy): clean .next before build to avoid stale standalone chunks#76

Merged
Musiker15 merged 1 commit into
mainfrom
chore/deploy-clean-build
Jun 21, 2026
Merged

chore(deploy): clean .next before build to avoid stale standalone chunks#76
Musiker15 merged 1 commit into
mainfrom
chore/deploy-clean-build

Conversation

@Musiker15

Copy link
Copy Markdown
Member

Prevents the production ChunkLoadError class: the deploy built on top of a prior .next, so an interrupted/partial build could leave the standalone referencing a server chunk that was never re-emitted (seen for _global-error/page.js during the earlier sharp-crash deploys). Adds rm -rf apps/web/.next before pnpm run build so every deploy yields a pristine standalone bundle. A clean local build confirmed no real (.js) chunk is missing — this just removes the stale-state failure mode.

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.)
@Musiker15 Musiker15 merged commit d089f7a into main Jun 21, 2026
3 checks passed
@Musiker15 Musiker15 deleted the chore/deploy-clean-build branch June 21, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant