From ad819e84b988ba4b3cb95778235bd6049409a83a Mon Sep 17 00:00:00 2001 From: Erik Silva Date: Wed, 21 Jan 2026 00:16:38 -0300 Subject: [PATCH] fix: force dynamic rendering on pages with database access to fix build --- src/app/page.tsx | 4 ++++ src/app/setup/page.tsx | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/app/page.tsx b/src/app/page.tsx index dbd7f56..ae07a5c 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -4,6 +4,10 @@ import { redirect } from "next/navigation"; import LoginClient from "@/components/LoginClient"; import { getSession } from "@/app/actions/auth"; +// Force dynamic rendering - this page needs database access +export const dynamic = 'force-dynamic'; + + export default async function Page() { // Verifica se o usuário já está logado const session = await getSession(); diff --git a/src/app/setup/page.tsx b/src/app/setup/page.tsx index 4f05c59..cc14b2b 100644 --- a/src/app/setup/page.tsx +++ b/src/app/setup/page.tsx @@ -2,6 +2,9 @@ import { prisma } from "@/lib/db"; import { redirect } from "next/navigation"; import SetupClient from "./SetupClient"; +// Force dynamic rendering - this page needs database access +export const dynamic = 'force-dynamic'; + export default async function SetupPage() { // Verifica se já existe alguma organização cadastrada const existingOrg = await prisma.organization.findFirst();