is there any way to tell prisma where the schema.p...
# prisma-client
m
is there any way to tell prisma where the schema.prisma file is? trying to do more deterministic bundling for lambda functions and it's not easy to put it in the same dir as the script (related: it would be really cool if prisma didn't use
__dirname
to find it because it doesn't exist in ESM)
๐Ÿ™Œ 1
m
I think you put in your package.json something like:
Copy code
prisma: {
   schema: "/your/path"
}
not the best practice imho, I was using it and changed it to stay pointing to the default...
n
I think all CLI commands that depend on the
schema.prisma
file also accept a
--schema
option to specify the file path, e.g.
prisma generate --schema ./custom/path/to/schema.prisma
. More info in the docs: https://www.prisma.io/docs/reference/api-reference/command-reference#arguments-1 ๐Ÿ™‚
โœ… 1
m
i'm trying to tell prisma where the schema file is in the lambda bundle zip i'm deploying. the schema file isn't in the same dir as the bundle
so like an env var or something would be ideal
n
Oh thatโ€™s interesting, can you create an issue for that so that we can evaluate this?
m