PrismaP
Prisma12mo ago
5 replies
Yash.

Turborepo setup not working with prisma: Cannot find module `fs`

I have started to migrate my basic NextJs application to turborepo and am facing some issues with using prisma client. I have a nextJs app with trpc among others and we use mongodb. I have followed this link https://www.prisma.io/docs/guides/using-prisma-orm-with-turborepo but I see that while I am using this from the web app I see an error regarding the use of fs in the browser. Upon inspecting the generated/client/index.js file I see this code <attached screenshot>. Can anyone please help regarding this. My turbo version is 2.3.3 and Prisma is at 6.3.0
Screenshot_2025-02-11_at_12.06.02_PM.png
Screenshot_2025-02-11_at_12.08.59_PM.png
Learn step-by-step how to integrate Prisma ORM with Turborepo to build modular, scalable monorepo architectures efficiently.
How to use Prisma ORM with Turborepo | Prisma Documentation
Was this page helpful?