prisma: Using Prisma `NextJS` edge runtime leads to error
Problem
Currently, running @prisma/client
in NextJS edge runtime
is not supported.
Suggested solution
Add support for using @prisma/client
in edge
runtimes
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 62
- Comments: 26 (10 by maintainers)
We are working on this right now, have an internal working prototype (so know it is possible), and expect to share a first early access version with people who filled the survey in the next weeks.
Hey, we at Prisma have been working on the foundations for Edge Functions support, including Next.js edge runtime, for the past few weeks. Soon, we’ll have something to share and test! If you are interested in helping us, please respond to this super short survey and leave your email address so we can get in touch with instructions: https://pris.ly/survey/driver-adapter-nextjs-edge-runtime Thanks.
Not yet, we’ll definitely let you know here when we have an update. Stay tuned 📻
Excited for a response on getting prisma in edge runtime
Any improvements?
Any updates on this? Everybody is going edge and cold starts are becoming unbearable. We love Prisma and the DX is unmatched but this issue is pushing us to use alternative edge compatible solutions. Can you guys give us a status update, or an ETA, or a roadmap?
Really don’t want to drop Prisma 😁
We invited the first few people, yes. We’ll react to their feedback now, get fixes implemented, and then invite more people.
Yes, watch our for our next release - it should include some very relevant things related to using Next.js via edge runtimes in edge function environments.
Well, I think that is ok a few hours before a release 😆
Hey everyone!
We just released Prisma ORM version 5.11.0 which includes a preview feature for Edge Functions support via Cloudflare Workers and Pages and Vercel Edge Functions and Middleware in Prisma ORM 🥳
pg
on Cloudflare 💥Please give it a try, and let us know how it goes! If you encounter any problems, please create a new bug report issue, or if the problem is driver adapter specific, use the feedback discussions for
@prisma/adapter-neon
,@prisma/adapter-planetscale
,@prisma/adapter-libsql
/ Turso or@prisma/adapter-pg
🙇PS: We are also working on support for Cloudflare D1, and expect to share news in this feature request issue soon. (Early Access for that is already in progress)
This is still happening in edge runtime.
Can’t wait for this. Hope you will launch it soon, otherwise I need to migrate supastarter.dev to Drizzle to support edge functions. I really want to keep Prisma though!
Early Access ongoing with quite a few users now, but expect a public Preview release soon.
@joselvelez See https://github.com/prisma/prisma/issues/18763#issuecomment-1633746408
I just ran into this issue as well in my project. Any updates?
+1