I have a monorepo with prisma as a separate packag...
# orm-help
e
I have a monorepo with prisma as a separate package. When I import PrismaClient from this package, it tries to find schema.prisma file in the current directory. How can I fix this? I'm using pnpm
n
Hey Eden 👋 You can specify --schema argument to specify the path of schema.prisma file. Here’s the reference
e
Hey Nurul! Thanks for the quick answer! The problem is that I have already generated from schema and I'm trying to import it in the other place. I will try one more thing, may it will help
👍 1
Copy code
error - Error: ENOENT: no such file or directory, open '.../kite/apps/client/.next/server/pages/api/auth/schema.prisma'
see? it tries to find
schema.prisma
file in apps/client folder, but I have it in packages/prisma folder
it looks like I get this issue https://github.com/prisma/prisma/issues/10512 . Is there any workaround?
n
Did you try updating to the latest
@prisma/client
version?
e
yeah, I had latest version from dev branch. I had to downgrade to 3.0.2 - it solved the issue 😞
nah, it didn't help, I'm still having this problem
n
That’s strange as this issue is fixed, can you create a Bug Report for this so that we could reproduce this and test it?
e
I'll try, thanks