4 ms·
Depending on your deployment environment and workflow, there indeed can be special requirements wrt deployment (also because Prisma Client relies on a "query en
by nikolasburk 7y ago
Depending on your deployment environment and workflow, there indeed can be special requirements wrt deployment (also because Prisma Client relies on a "query engine binary" [1] which needs to run as a side-process on the same machine as your application). When deploying, you need to ensure that you're selecting the right build target [2] for the binary. You can find more info in the deployment docs [3].
TLDR: Generally deployment should "just work", but there can be cases when you might have to do some extra configuration to get your app deployed.
Also note that you can actually generate Prisma Client into a different location [4], so if you prefer not to have it in node_modules, that's totally possible as well.
[1] https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/query-engine https://www.prisma.io/docs/reference/tools-and-interfaces/pr...
[2] https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-schema/generators#binary-targets https://www.prisma.io/docs/reference/tools-and-interfaces/pr...
[3] https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/deployment https://www.prisma.io/docs/reference/tools-and-interfaces/pr...
[4] https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/generating-prisma-client#specifying-the-target-location-for-prisma-client https://www.prisma.io/docs/reference/tools-and-interfaces/pr...
- migueloller 7y agoHaving the option to generate it elsewhere is great, because it does break some pretty big integrity invariants that are assumed by various tools. node_modules shouldn't be changing, specially when there's lockfiles being used.