Runtime Error on latest versions of Next, AuthJS, and Prisma when initializing prisma adapter
I'm running the most recent versions of everything (just building from scratch) as soon as I enable the prisma adapter in AuthJS I get a runtime error:
I am running with Prisma Postgres which should be Edge compatible
Error: Failed to load external module node:module: ReferenceError: Cannot access 'require' before initialization
Sonnet and Devin just make a mess of everything.
Compared line by line for my resource files (auth.ts, prisma.ts, etc...) as far as I could with https://github.com/prisma/nextjs-prisma-postgres-demo/tree/main and everything looks right
export const { handlers, signIn, signOut, auth } = NextAuth({
THIS LINE --> adapter: PrismaAdapter(prisma),
providers: [Discord],
})
I am running with Prisma Postgres which should be Edge compatible
Error: Failed to load external module node:module: ReferenceError: Cannot access 'require' before initialization
Sonnet and Devin just make a mess of everything.
Compared line by line for my resource files (auth.ts, prisma.ts, etc...) as far as I could with https://github.com/prisma/nextjs-prisma-postgres-demo/tree/main and everything looks right
export const { handlers, signIn, signOut, auth } = NextAuth({
THIS LINE --> adapter: PrismaAdapter(prisma),
providers: [Discord],
})
GitHub
Contribute to prisma/nextjs-prisma-postgres-demo development by creating an account on GitHub.