Generator: `output` is relative to `./prisma`
See original GitHub issueIf you have a generator in your schema.prisma
like this:
generator testutils {
provider = "./node_modules/prisma-test-utils/dist/generator.js"
output = "./node_modules/@generated/prisma-test-utils"
}
The output is actually generated in ./prisma/node_modules/@generated/prisma-test-utils
:
✔ Generated Prisma Test Utils to .\prisma\node_modules\@generated\prisma-test-utils in 3.95s
That was unexpected to me.
Changing output
to use ../node_modules...
fixes the problem.
(Could potentially also be the fault of the generator I am trying to use.)
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Generators (Reference) - Prisma
A generator determines which assets are created when you run the prisma generate command. The main property provider defines which Prisma Client (language ......
Read more >Prisma generators output abnormally - A bug, or a possible ...
Issue: When executing the npx prisma generate command, there is a possibility of an error with the following log or a similar error...
Read more >Create Prisma Generator - DEV Community
prisma tells the generator where to output the generated files with a path relative to the directory where schema.prisma is located, try to ......
Read more >DBML generator for Prisma - notiz.dev
Introducing Prisma DBML Generator automatically generating a DBML schema based ... @id bio String? user User @relation(fields: [userId], ...
Read more >Prisma Relations and Redwood's Generators
You can generate the SDLs for all the models in the relation, ignoring the errors. This way the last model in the relation...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This still happens in
2.6.0-dev.61
. The output still uses the prisma directory as a root.Ok, it is indeed relative to
schema.prisma
location. I just tried that out.We don’t document whether it is relative to schema or not: https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#fields-1