pnpm install puts prisma generate in the wrong folder

this is my root pnpm-worspaces.yaml
packages:
- 'database'
- 'website'
- 'microservice'
- 'lib'
packages:
- 'database'
- 'website'
- 'microservice'
- 'lib'
inside my database I have prisma/schema.prisma and postinstall script of prisma generate and a prisma.ts file that exports default the prisma client and * from prisma/client. If I manually prisma generate then my website resolves models correctly. If I run pnpm install this does not work. FYI: I cannot cd and do npx prisma generate because vercel only clones the webiste directory, so I have to make it work with pnpm.
1 Reply
RaphaelEtim
RaphaelEtim2mo ago
Hi @Abdul Munim Can you take a look at this comment that addresses issues with using pnpm with Prisma?
GitHub
pnpm install not running prisma generate · Issue #6603 · prisma...
Bug description When installing within a PNPM monorepo the generator isn't being run. I suspect it might have something to do with PNPM symlinking dependencies and therefore messing with the cl...
Want results from more Discord servers?
Add your server