From bcc1e1793490222415b5cfd0baee17bf4c7cab76 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 17 Jan 2026 16:21:12 +0100 Subject: [PATCH] Fix login page build error - force dynamic rendering The login page checks database for setup status, which fails during static page generation at build time. Force dynamic rendering to defer the check to runtime. Co-Authored-By: Claude Opus 4.5 --- src/app/(auth)/login/page.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/(auth)/login/page.tsx b/src/app/(auth)/login/page.tsx index 9cf1985..cd081de 100644 --- a/src/app/(auth)/login/page.tsx +++ b/src/app/(auth)/login/page.tsx @@ -3,6 +3,9 @@ import { redirect } from 'next/navigation' import { isSetupRequired } from '@/lib/setup' import { LoginForm, LoginFormSkeleton } from './login-form' +// Prevent static generation - requires database check at runtime +export const dynamic = 'force-dynamic' + export default async function LoginPage() { // Check if initial setup is required const setupRequired = await isSetupRequired()