You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't find a way to use prisma db package with nestjs app inside a turborepo. I'm using the latest version of prisma (v6.6) . I generated esm module prisma-client based on the documentation and export it from the db package, and it works fine when using it with next app but not nest app.
the next app and db package compiles to esm, so it makes sense to work but since nest app compiles to cjs, some part of the generated prisma-client code won't work.
I've even tried generating prisma client with cjs, still not working.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I can't find a way to use prisma db package with nestjs app inside a turborepo. I'm using the latest version of prisma (v6.6) . I generated esm module prisma-client based on the documentation and export it from the db package, and it works fine when using it with next app but not nest app.
the next app and db package compiles to esm, so it makes sense to work but since nest app compiles to cjs, some part of the generated prisma-client code won't work.
I've even tried generating prisma client with cjs, still not working.
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions