From 22381e5d5f23a0dea5aaaa874115e75851ccc8e4 Mon Sep 17 00:00:00 2001 From: shadcn Date: Sat, 5 Nov 2022 11:01:41 +0400 Subject: [PATCH] fix: typecheck for next-auth --- next.config.js | 2 -- pages/api/auth/[...nextauth].ts | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/next.config.js b/next.config.js index e6a79b7..7013f8d 100644 --- a/next.config.js +++ b/next.config.js @@ -6,8 +6,6 @@ const nextConfig = { }, experimental: { appDir: true, - newNextLinkBehavior: true, - serverComponentsExternalPackages: ["prisma"], }, } diff --git a/pages/api/auth/[...nextauth].ts b/pages/api/auth/[...nextauth].ts index 2b29112..4a0b176 100644 --- a/pages/api/auth/[...nextauth].ts +++ b/pages/api/auth/[...nextauth].ts @@ -14,7 +14,10 @@ const POSTMARK_ACTIVATION_TEMPLATE = 29559329 const prisma = new PrismaClient() export const authOptions: NextAuthOptions = { - adapter: PrismaAdapter(prisma), + // huh any! I know. + // This is a temporary fix for prisma client. + // @see https://github.com/prisma/prisma/issues/16117 + adapter: PrismaAdapter(prisma as any), pages: { signIn: "/login", },