Prisma Client Package in NX

I have a monorepo created via NX. How do I create a package inside said repo that contains the prisma generated client? I would like to be able to share the code between my backend and frontend. Specifically I would like to use the generated enumerations in my frontend and the database client in the backend. Thanks.
4 Replies
Prisma AI Help
You decided to hold for human wisdom. We'll chime in soon! Meanwhile, #ask-ai is there if you need a quick second opinion.
mossman1120
mossman1120OP3w ago
#ask-ai do you have any thoughts? @kapa.ai do you have any thoughts on this?
jonfanz
jonfanz3w ago
We have this guide and a similar guide for turborepo. Would it be possible to use those to help?
How to use Prisma ORM in a pnpm workspaces monorepo | Prisma Docume...
Learn step-by-step how to integrate Prisma ORM in a pnpm workspaces monorepo to build scalable and modular applications efficiently.
mossman1120
mossman1120OP3w ago
i think i tried looking though this and i got stuck it was hard to pull apart what should / is handled by nx and what needs to be done by me likei have library generating the client but something strange happens when using the prisma-client-js vs the prisma-client client. i am also using expressjs as the backend and react as the frontend so i am not sure if that is causing issues either

Did you find this page helpful?