Next.js Discord

Discord Forum

Error with Prisma + Auth JS (Next JS)

Unanswered
Weevil parasitoid posted this in #help-forum
Open in Discord
Avatar
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
Image
Image

6 Replies

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