Prisma ESM (node-postgres) / tRPC 11 / Next.js 15 issue
Hi everyone!
Key components of our stack:
- Prisma 6.9.0 (with pg adapter)
- Next.js 15.3.3
- tRPC 11.3
- Tanstack React Query 5.80.6
We also use Bun
When attempting to migrate to Prisma ESM client using driverAdapters (as described in the documentation), build errors occur:
The same error occurs for 'fs', 'tls' and so on
Using webpack directives in next.config.mjs doesn't solve the problem
As you can see, the stack trace points to the first tRPC call in the client component.
The project uses standard tRPC 11 configuration for Next.js App Router. For testing purposes, I simplified the tRPC context by removing Clerk authentication and keeping only db
Perhaps someone has encountered a similar issue and can suggest a solution. Unfortunately, using the serverless pg driver is not an option for us - we are tightly coupled to Azure.
Thanks
0 Replies