Prisma in next.js monorepo such as t3-turbo does not work

When I try to convert my create-t3-app to a t3 turbo monorepo (https://github.com/t3-oss/create-t3-turbo) I am hit with this issue from Prisma: https://www.prisma.io/docs/guides/other/troubleshooting-orm/help-articles/nextjs-prisma-client-monorepo Using the @prisma/nextjs-monorepo-workaround-plugin plugin results in a non-working app, so it is unusable. Has anyone gotten this to work?
GitHub
GitHub - t3-oss/create-t3-turbo: Clean and simple starter repo usin...
Clean and simple starter repo using the T3 Stack along with Expo React Native - GitHub - t3-oss/create-t3-turbo: Clean and simple starter repo using the T3 Stack along with Expo React Native
Prisma
Using Prisma Client in a Next.js project in a monorepo setup
Using Prisma Client in a Next.js project in a monorepo setup
1 Reply
CaptainPhoton
CaptainPhoton•15mo ago
When I say "non-working app", I mean that the next.js build console logs this: "ready - started server on 0.0.0.0:3000, url: http://localhost:3000" but the app doesn't respond. Maybe this is the sign I need to convert to Drizzle 🙂 The page load request does not get a response Of course it flipping works in the create-t3-turbo template 😭 Lol this is probably why it doesn't work:
Generated Prisma Client (4.12.0 | library) to ./../../node_modules/.pnpm/@prisma+client@4.12.0_prisma@4.12.0/node_modules/@prisma/client
Generated Prisma Client (4.12.0 | library) to ./../../node_modules/.pnpm/@prisma+client@4.12.0_prisma@4.12.0/node_modules/@prisma/client
the heck Solved now. What I did was put node-linker=hoisted in .npmrc, delete all node_modules folders, run pnpm install. Then generate the client from the prisma module folder, not the root with Turborepo, then run the nextjs app from the nextjs app folder, not with turborepo Now when I run dev from the root with turborepo it seems to work. WHEW Why do people say Turborepo is great? I just wasted a ton of time on this BS