fix(deploy): unstick nitro Json typecheck and wipe poisoned .next cache
Local Build and Deploy / deploy (push) Failing after 1m21s

Host next build still saw Json on nitro while tsc passed; use any helpers, verify blob hash, and delete .next entirely before build.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-18 20:14:50 +02:00
1 parent 1abbf3fde7
commit 968f6ff7db
3 files changed
+57 -78

No files matched your search

+5 -4
View File
@@ -8,9 +8,8 @@ describe("production deploy workflow", () => {
"utf8",
);
it("preserves the Next.js incremental build cache", () => {
// May clear .next/types or .next/dev, but must not wipe the whole .next tree.
expect(workflow).not.toMatch(/rm\s+-rf\s+\.next(?:\s|$)/);
it("wipes .next before build to avoid stale Next typecheck caches", () => {
expect(workflow).toContain("rm -rf .output dist .next");
expect(workflow).toContain("pnpm install --frozen-lockfile");
expect(workflow).toContain("SKIP_ENV_VALIDATION=1");
});
@@ -25,8 +24,10 @@ describe("production deploy workflow", () => {
expect(resetAt).toBeGreaterThan(reclaimAt);
});
it("verifies src/ matches HEAD and clears tsbuildinfo before typecheck", () => {
it("verifies src/ and nitro blob match HEAD before typecheck", () => {
expect(workflow).toContain("git diff --exit-code -- src");
expect(workflow).toContain("git hash-object");
expect(workflow).toContain("nitro-editor-dialog.tsx");
expect(workflow).toContain("*.tsbuildinfo");
expect(workflow).toContain("pnpm typecheck");
});