Switch to prisma-client-js generator to fix Turbopack RSC crash

The new prisma-client generator outputs TypeScript files to src/generated/prisma/
which include import.meta.url at module level. Turbopack sees this and marks the
entire module as a client reference, causing 'Cannot access toStringTag on the
server' on every page that uses Prisma.

Switching to prisma-client-js puts the generated client in node_modules/@prisma/client
where serverExternalPackages can properly exclude it from the server bundle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-25 14:32:31 +05:00
parent 4821764a4f
commit 29f6533e63
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -1,6 +1,5 @@
generator client {
provider = "prisma-client"
output = "../src/generated/prisma"
provider = "prisma-client-js"
}
datasource db {
+1 -1
View File
@@ -1,4 +1,4 @@
import { PrismaClient } from "@/generated/prisma/client";
import { PrismaClient } from "@prisma/client";
import { PrismaPg } from "@prisma/adapter-pg";
const globalForPrisma = globalThis as unknown as {