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 <noreply@anthropic.com>
This commit is contained in:
parent
a68e1084ad
commit
bcc1e17934
|
|
@ -3,6 +3,9 @@ import { redirect } from 'next/navigation'
|
||||||
import { isSetupRequired } from '@/lib/setup'
|
import { isSetupRequired } from '@/lib/setup'
|
||||||
import { LoginForm, LoginFormSkeleton } from './login-form'
|
import { LoginForm, LoginFormSkeleton } from './login-form'
|
||||||
|
|
||||||
|
// Prevent static generation - requires database check at runtime
|
||||||
|
export const dynamic = 'force-dynamic'
|
||||||
|
|
||||||
export default async function LoginPage() {
|
export default async function LoginPage() {
|
||||||
// Check if initial setup is required
|
// Check if initial setup is required
|
||||||
const setupRequired = await isSetupRequired()
|
const setupRequired = await isSetupRequired()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue