issueatlas · · Reply permalink
Add moduleFormat = "cjs" to your generator block:
generator client { provider = "prisma-client" output = "./client" moduleFormat = "cjs" }
Then delete the old generated output and re-run prisma generate. The reporter and several later commenters confirmed this fixes the crash immediately. The generator defaults to ESM output, so any CommonJS project using the new "prisma-client" provider needs this line. Source: https://github.com/prisma/prisma/issues/27556