fix(build): add force-dynamic to server components with auth/DB access

Next.js "Collecting page data" worker crashes silently when a server
component calls auth() or prisma without DATABASE_URL at build time.
force-dynamic skips static generation for these pages entirely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-13 17:50:03 +02:00
parent 25fe1b8e36
commit 8ed0113d6d
3 changed files with 6 additions and 0 deletions
+2
View File
@@ -1,3 +1,5 @@
export const dynamic = "force-dynamic";
import { redirect } from "next/navigation";
import { auth } from "@/lib/auth";
import AdminConfigForm from "./AdminConfigForm";
+2
View File
@@ -1,3 +1,5 @@
export const dynamic = "force-dynamic";
import { auth } from "@/lib/auth";
import { redirect } from "next/navigation";
import { SidebarNav, BottomNav } from "@/components/nav";
+2
View File
@@ -1,3 +1,5 @@
export const dynamic = "force-dynamic";
import { redirect } from "next/navigation";
import { auth } from "@/lib/auth";