Exporting prisma types from turborepo package

Referencing the packages/db package in the create t3 turbo repo, the index.ts file re-exports all the named exports from @prisma/client (export * from "@prisma/client"). I can import the generated prisma models just fine, but I can't seem to import the types. Are types exported with the wildcard re-export?
1 Reply
stillmotion
stillmotionOP2y ago
Ah such a subtle bug that took too long to figure out. I have two db packages that generate two different prisma clients. Because pnpm uses symlinked node_modules for workspaces, one db package was overwriting the other, so the one that got overwritten was exporting PrismaClient: any, which made it seem like all the types weren't being exported.
Want results from more Discord servers?
Add your server