prisma icon indicating copy to clipboard operation
prisma copied to clipboard

Error thrown using PrismaClient in Cloudflare Pages project

Open richburdon opened this issue 1 year ago • 1 comments

I'm successfully using Prisma within a Cloudflare 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:

Error: PrismaClient is not configured to run in Cloudflare Workers

The client object is created successfully, but the error throws on the first query.

I'm also confused about the datasource.url param in the schema.prisma file. What value should be provided there? Its ignored by the worker, but is something required for Pages for some reason?

richburdon avatar Jul 17 '24 17:07 richburdon

Same here, OS: Linux Mint

DjagbleyEmmanuel avatar Jul 21 '24 12:07 DjagbleyEmmanuel