Page + d1 + prisma problem


I’m working on a small project, i have built a d1 DB and all worked good.

After a while i have been added prisma support but now it is not working, i’m getting:

“Error in performIO: TypeError: Cannot read properties of undefined (reading ‘prepare’)”
“PrismaClientUnknownRequestError: Invalid prisma.user.create() invocation: Error occurred during query execution: ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(SqliteError { extended_code: 1, message: Some("Cannot read properties of undefined (reading ‘prepare’)") }), transient: false })”

can i use prisma with cloudflare pages and d1 at all?


Since you asked, I was curious as well. Apparently, yes

Did you get this working?

bunx wrangler d1 migrations apply <DATABASE_NAME> --local
bunx prisma generate

worked for me