Fix login page build error - force dynamic rendering
Build and Push Docker Image / lint-and-typecheck (push) Successful in 1m42s Details
Build and Push Docker Image / build (push) Successful in 4m34s Details

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 <noreply@anthropic.com>
This commit is contained in:
Matt 2026-01-17 16:21:12 +01:00
parent a68e1084ad
commit bcc1e17934
1 changed files with 3 additions and 0 deletions

View File

@ -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()