Edge/Cloudflare issue with new ts client: `Accelerate not set up` even if we definitely set it up
This is our stack:
- Nuxt 4 app
- Deployed on Cloudflare Workers
- Prisma ORM + Prisma Postgres + Prisma Accelerate
We are on the latest versions:
Now, whenever we run the app we get this error:
If we comment out the
runtime = cloudflare line in schema.prisma, then the app works locally (with nuxt dev) but we get this error if we run it on Cloudflare environment (with wrangler dev after building it):
The only option that worked for us so far is to use the old JS client + avoiding specifying the output path like below (in which case it works both locally and on Cloudflare) + initializing the client from the /edge folder. In this case, we are still able to specify cloudflare as the runtime.
So are we able to use the new TS client with accelerate on the edge?2 Replies
You selected the carefully hand-crafted route. A dev artisan will respond soon. Meanwhile, the
#ask-ai channel awaits if you're curious!There are some issues with Accelerate and the new TS Client which will be fixed in upcoming prisma release 6.17.0.
I would recommend testing out the new version and let me know if the issue still persists?