-
Notifications
You must be signed in to change notification settings - Fork 89
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
error TS2300: Duplicate identifier
when referencing the same enum twice in a model
#109
Comments
I think the problem is the following line which should probably be a unique set based on the identifier. https://github.com/CarterGrimmeisen/zod-prisma/blob/main/src/generator.ts#L47 |
I made a pull request for this. |
@CarterGrimmeisen any chance you can release this fix to npm? Looks like f3c27fb fixes the issue but the most recent version on npm is from 6 months ago. Appreciate your work on this project, this is awesome! |
Running into the same issue here. My temporary workaround is to generate Zod schema on my dev environment, fix errors & comment out the generator before git commit. (If you don't comment out the generator, the generated file will be overridden during |
Until @MatthiasDunker 's fix gets deployed, you can install my fork (works for me):
|
I'm having the same issue. Any update when the npm release will be updated? :) |
We get a TS error due to duplicated named imports.
This schema:
Generates the following which results in the TS error
Desired:
Imported identifier should only be written once.
The text was updated successfully, but these errors were encountered: