diff --git a/app/(auth)/auth/callback/route.ts b/app/(auth)/auth/callback/route.ts index 12460320..d06571b3 100644 --- a/app/(auth)/auth/callback/route.ts +++ b/app/(auth)/auth/callback/route.ts @@ -26,7 +26,7 @@ export async function GET(request: NextRequest) { cookiesToSet.forEach((cookie) => { // Mirror the cookie into request.cookies so subsequent getAll() // calls within this request lifecycle return the updated values - // (matches the pattern used in middleware.ts). + // (matches the pattern used in proxy.ts). request.cookies.set(cookie.name, cookie.value) pendingCookies.push(cookie) }) diff --git a/next.config.ts b/next.config.ts index 69e03dca..226f3ad6 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,8 +1,12 @@ +import path from "node:path"; +import { fileURLToPath } from "node:url"; import type { NextConfig } from "next"; import createNextIntlPlugin from "next-intl/plugin"; const withNextIntl = createNextIntlPlugin("./i18n/request.ts"); +const projectRoot = path.dirname(fileURLToPath(import.meta.url)); + const isDev = process.env.NODE_ENV === "development"; const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL ?? ""; @@ -33,6 +37,11 @@ const cspDirectives = [ const nextConfig: NextConfig = { output: 'standalone', + // Multiple lockfiles exist above this project (e.g. a parent yarn.lock), + // which makes Turbopack infer the wrong workspace root. Pin it explicitly. + turbopack: { + root: projectRoot, + }, async redirects() { return [ {