gp999
gp999
PPrisma
Created by gp999 on 5/26/2024 in #help-and-questions
PrismaClient is not configured to run in Vercel Edge Functions or Edge Middleware
I created a next.js (14.2.3) app and followed Auth.js documentation to add Goole OAUTH and prisma database (schema successfully initiated), now when I click "Sign In with Google" I see the following error in console:
[auth][error] AdapterError: Read more at https://errors.authjs.dev#adaptererror
[auth][cause]: Error: PrismaClient is not configured to run in Vercel Edge Functions or Edge Middleware. In order to run Prisma Client on edge runtime, either:
- Use Prisma Accelerate: https://pris.ly/d/accelerate
- Use Driver Adapters: https://pris.ly/d/driver-adapters

If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report
at Object.get (webpack-internal:///(middleware)/./node_modules/.prisma/client/index-browser.js:218:15)
at getSessionAndUser (webpack-internal:///(middleware)/./node_modules/@auth/prisma-adapter/index.js:28:44)
at acc.<computed> (webpack-internal:///(middleware)/./node_modules/@auth/core/lib/init.js:178:30)
at Module.session (webpack-internal:///(middleware)/./node_modules/@auth/core/lib/actions/session.js:67:36)
at AuthInternal (webpack-internal:///(middleware)/./node_modules/@auth/core/lib/index.js:47:77)
at async Auth (webpack-internal:///(middleware)/./node_modules/@auth/core/index.js:126:34)
at async handleAuth (webpack-internal:///(middleware)/./node_modules/next-auth/lib/index.js:134:29)
at async adapter (webpack-internal:///(middleware)/./node_modules/next/dist/esm/server/web/adapter.js:179:16)
at async /home/gp99/my-app/node_modules/next/dist/server/web/sandbox/sandbox.js:110:22
at async runWithTaggedErrors (/home/gp99/next.js/my-app/node_modules/next/dist/server/web/sandbox/sandbox.js:107:9)
[auth][error] AdapterError: Read more at https://errors.authjs.dev#adaptererror
[auth][cause]: Error: PrismaClient is not configured to run in Vercel Edge Functions or Edge Middleware. In order to run Prisma Client on edge runtime, either:
- Use Prisma Accelerate: https://pris.ly/d/accelerate
- Use Driver Adapters: https://pris.ly/d/driver-adapters

If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report
at Object.get (webpack-internal:///(middleware)/./node_modules/.prisma/client/index-browser.js:218:15)
at getSessionAndUser (webpack-internal:///(middleware)/./node_modules/@auth/prisma-adapter/index.js:28:44)
at acc.<computed> (webpack-internal:///(middleware)/./node_modules/@auth/core/lib/init.js:178:30)
at Module.session (webpack-internal:///(middleware)/./node_modules/@auth/core/lib/actions/session.js:67:36)
at AuthInternal (webpack-internal:///(middleware)/./node_modules/@auth/core/lib/index.js:47:77)
at async Auth (webpack-internal:///(middleware)/./node_modules/@auth/core/index.js:126:34)
at async handleAuth (webpack-internal:///(middleware)/./node_modules/next-auth/lib/index.js:134:29)
at async adapter (webpack-internal:///(middleware)/./node_modules/next/dist/esm/server/web/adapter.js:179:16)
at async /home/gp99/my-app/node_modules/next/dist/server/web/sandbox/sandbox.js:110:22
at async runWithTaggedErrors (/home/gp99/next.js/my-app/node_modules/next/dist/server/web/sandbox/sandbox.js:107:9)
3 replies