PrismaClient is not configured to run in Edge Runtime
Stack: SvelteKit, Vercel, Prisma (Neon adapter) & Better Auth
I've tried so many solutions I can't even recall half of them. I've spent about three hours trying to get everything up and running and I just can't get rid of this error (attached)
Here's my related files, if anyone can help solve this I'd be forever grateful.
build cmd:
"build": "npx prisma generate && vite build",
schema.prisma:
lib/prisma.ts:
svelte.config.js:
3 Replies
It's getting to the stage that we're considering ditching Prisma, which we'd really prefer not to do π
Hey π
I assume you would have seen this docs section of using Neon HTTP Driver:
https://www.prisma.io/docs/orm/prisma-client/deployment/edge/deploy-to-vercel#neon
Is your repository open source? Any way I can try to run this locally to debug? When exactly do you get this error? I see the error seems to be coming from better-auth package
Deploy to Vercel Edge Functions & Middleware | Prisma Documentation
Learn the things you need to know in order to deploy an Edge function that uses Prisma Client for talking to a database.
Hey mate, the repo isnβt open source but Iβd be happy to share it privately if youβd be kind enough to add my.
The error occurs when accessing anything from Prisma, whether auth is involved or not