Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prisma generate fails when parsing/validating schema #110

Open
3x071c opened this issue Apr 21, 2022 · 4 comments · May be fixed by #124
Open

Prisma generate fails when parsing/validating schema #110

3x071c opened this issue Apr 21, 2022 · 4 comments · May be fixed by #124

Comments

@3x071c
Copy link

3x071c commented Apr 21, 2022

Glad I found this, but trying to add any custom option to the generator section in my schema.prisma file results in prisma complaining:

$ npx prisma generate
Environment variables loaded from .env
Prisma schema loaded from db/schema.prisma
Error: Get config: Schema Parsing P1012

error: Error validating: This line is not a valid definition within a generator.
  -->  schema.prisma:10
   | 
 9 |     provider = "zod-prisma"
10 |     output   = "../somewhere" // the directory where generated zod schemas will be saved
   | 

...

Validation Error Count: x

Looks like prisma is unaware of the options the zod-prisma provider exposes. Can this be fixed?

@yousufiqbal
Copy link

Same here

@thangngoc89
Copy link

You need to remove all comments

@sourcec0de
Copy link

You need to remove all comments

This solved it for me.

@sourcec0de
Copy link

I submitted a fix to the docs.
#124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants