Next.js Discord

Discord Forum

Error with Prisma + Auth JS (Next JS)

Unanswered
Weevil parasitoid posted this in #help-forum
Open in Discord
Weevil parasitoidOP
I decided to enable authorization via GitHub using Auth JS and so that all users and the session are saved, I use the Prisma Client. But it seems to save everything, authorizes, but issues errors, they can be seen on the screenshot. What to do? Help please

6 Replies

Bighead carp
I had this issue yesterday - it might be worth opening a git issue for on the prisma repository
Prisma is not supported on middleware. You have to use api route or use prisma accelerate
@Weevil parasitoid You can't use Prisma on Edge Function. Remove the following if you have:
export const runtime = 'edge'
Previous next auth config management was easy to manage imo. Upcoming V5 seems out of place
Bighead carp
Tbh it is in beta
V5 API is MUCH nicer than v4