When using the @prisma/adapter-pg I get a module build fail trying to use the prisma client.
I have a turborepo next 14 monorepo that exports the prisma client into my front and back end apps from the database package. I have all my prisma dependencies installed there. I am getting:
Could this have to do with monorepo set up? and not having the postgres installed
adapter in the front/back -end folders?
3 Replies
You decided to hold for human wisdom. We'll chime in soon! Meanwhile,
#ask-ai is there if you need a quick second opinion.here is my client.ts:
I installed pg in my frontend package and that brought to another issue,
The generated client is in the database folder, it shouldnt b looking for it in the frontend
actually im not sure it is wrong for it to be trying to get it from fronted, but it isnt finding it either way
Yeah the actual issue is that the generated prisma file is not available at runtime in my monrepo for some reason
Hey!
I believe you are generating PrismaClient at a custom location by setting output path. Can you temporarily comment out the output path and check if generating PrismaClient at the default location (inside node_modules) fixes the issue for you?