prisma
prisma copied to clipboard
Error thrown using PrismaClient in Cloudflare Pages project
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?
Same here, OS: Linux Mint