Prisma + Serverless + Supabase

I'm trying to get Prisma up and running again on Vercel as I'm moving off Prisma Accelerate I'm using Supabase (Postgres) as my database provider. However, I keep getting a lot of errors due to: 1. Not using prisma from @prisma/client/edge 2. Not using Prisma Accelerate so my connection url doesn't start with prisma:// I can't use a driver adapter as node-postgres (pg) isn't supported. I have added ?pgbouncer=true to my connection string (suggested by Supabase as well), however, Prisma still doesn't want to work What are my options right now? I'm also using prisma-client-js right now, I'm willing to switch to the preview prisma-client if that helps?
3 Replies
Prisma AI Help
You're in no rush, so we'll let a dev step in. Enjoy your coffee, or drop into #ask-ai if you get antsy for a second opinion!
jonfanz
jonfanz2w ago
Unfortunately there aren’t many options when it comes to Vercel edge functions. If you need to access your db from them, maybe some of the comments in this issue could help? https://github.com/brianc/node-postgres/issues/3206 specifically around using an api route as a workaround
GitHub
Doesn't work with next.js Edge runtime · Issue #3206 · brianc/nod...
I'm writing an app on next.js which I plan to deploy to CloudFlare Pages + Workers. I know there's CloudFlare support, but when running the local development server of next.js, I get the fo...
Woman wearing Vision Pro
Thanks, I'll take a look. But I imagine there are no easy fixes for this issue.

Did you find this page helpful?