richburdon
richburdon
Explore posts from servers
PPrisma
Created by richburdon on 7/17/2024 in #help-and-questions
Error using PrismaClient with Cloudflare Pages
I'm successfully using Prisma with a CF Workers project using the adapter like this:
const prisma = new PrismaClient({ adapter: new PrismaD1(c.env.DB) });
const prisma = new PrismaClient({ adapter: new PrismaD1(c.env.DB) });
However, when I try to use the same client in a Pages project I get the following error:
Error: PrismaClient is not configured to run in Cloudflare Workers
Error: PrismaClient is not configured to run in Cloudflare Workers
The client object is created successfully, but the error throws on the first query.
2 replies