Environment:
Framework: Next.js 16.1.6 (Turbopack enabled)
ORM: Prisma 7.4.2
Auth: better-auth 1.4.20
Runtime: Node v25.6.1
Package Manager: pnpm v10.0.0
The Issue:
Running next build fails with:
Module not found: Can't resolve '@prisma/client-runtime-utils'
Context:
I'm using the new Prisma 7 configuration (with prisma.config.ts). Since better-auth 1.4.20 has strict peer dependencies, I suspect there might be a hoisting issue with pnpm 10 or a conflict with the new @prisma/client-runtime-utils package not being bundled correctly by Next.js 16.
What I've tried:
pnpm install @prisma/client@7.4.2 prisma@7.4.2 to ensure version parity.
pnpm exec prisma generate.
Deleting .next and node_modules and re-running pnpm i.
Questions:
Is anyone else seeing @prisma/client-runtime-utils resolution errors specifically with pnpm 10?
Do I need to add @prisma/client-runtime-utils to serverExternalPackages in next.config.ts for Next 16?
Has anyone successfully bypassed the better-auth peer dependency conflict with Prisma 7 using pnpm 10's overrides or readPackage hook?