PrismaP
Prisma2y ago
3 replies
richburdon

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) });


However, when I try to use the same client in a Pages project I get the following error:
`ts
Error: PrismaClient is not configured to run in Cloudflare Workers


The client object is created successfully, but the error throws on the first query.
Was this page helpful?