Hey folks - I’m having an issue trying to bundle P...
# orm-help
s
Hey folks - I’m having an issue trying to bundle Prisma into a NextJS project. When the project is running (and instantiating a prisma client) in an API route - I’m getting
ENOENT: no such file or directory, open ../path/to/prisma.schema
(replaced path). More details in thread.
I actually have a separate package i’m importing into NextJS that contains the prisma client + schema
I’m assuming what is happening is that Next is somehow bundling all the code up, and the code that calls
new PrismaClient()
ends up in a nextjs API route folder, and it’s trying to find the schema relative to that code (and folder) rather than the actual source directory where the prisma stuff is maintained
j
Yes that sounds reasonable and potentially related to similar issues that have been reported at https://github.com/prisma/prisma/issues. Maybe have a look around there, and put your 👍 and comment on the one you find, or create a new issue and provide all the information we need to potentially reproduce this.
s