Files
Grow/src/app/page.tsx
T
arnaudne 8ed0113d6d 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>
2026-06-13 17:50:03 +02:00

13 lines
276 B
TypeScript

export const dynamic = "force-dynamic";
import { redirect } from "next/navigation";
import { auth } from "@/lib/auth";
export default async function Home() {
const session = await auth();
if (session?.user) {
redirect("/dashboard");
}
redirect("/auth/login");
}