PrismaP
Prisma9mo ago
12 replies
Abakir

I keep getting this error `Object literal may only specify known properties, and 'adapter' CF D1

I am using Cloudflare D1 and I keep getting this error Object literal may only specify known properties, and 'adapter' does not exist in type 'Subset<PrismaClientOptions, PrismaClientOptions>'.ts(2353)

Using this code:
const adapter = new PrismaD1(env.database);
const prisma = new PrismaClient({ adapter });


My Prisma file looks like this:

generator client {
  provider = "prisma-client-js"
  previewFeatures = ["driverAdapters"]
  output  = "../prisma-client"
}

datasource db {
  provider = "sqlite"
  url      = "file:./dev.db"
}
Was this page helpful?