Custom output
path can only work if it's in node_modules
#23896
Unanswered
shelleypham
asked this question in
Q&A
Replies: 1 comment
-
Hi @shelleypham 👋
The error above is not usually associated with using a custom output in Prisma but mostly using Prisma in middleware within Nextjs or calling Prisma on the client. Can you please share a minimal reproduction of the repository so we can take a look? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bug description
I followed the Prisma documentation for custom output:
https://www.prisma.io/docs/orm/prisma-client/setup-and-configuration/generating-prisma-client#using-a-custom-output-path
My stack:
Problem
I have two databases,
database_A
anddatabase_B
, that I have are running on docker containers viadocker-compose
. My Prisma client is not containerized. Each have their own schemasschema_A.prisma
andschema_B.prisma
.Both schemas generated successfully, pushed into my postgresql, and was seeded with data.
schema_A.prisma
uses the default custom output, butschema_B.prisma
uses a custom output.Everything that involves
schema_A.prisma
runs smoothly; however, whenever I am accessing the client fromschema_B.prisma
(the one with the custom output), I encounter this error:schema_A.prisma
:schema_B.prisma
:The workaround
As the output above
../tests/generated/client
does not work, I tried having it innode_modules
and everything worked smoothly.schema_B.prisma
:How to reproduce
schema_A.prisma
:schema_B.prisma
:Change to
schema_B.prisma
:Expected behavior
I expect to reference the Prisma client with my custom output
Prisma information
schema_A.prisma
:schema_B.prisma
:Environment & setup
Prisma Version
Beta Was this translation helpful? Give feedback.
All reactions