Closed eelior closed 10 months ago
Hi @eelior , thanks for reporting this! Do you have a repro project that we can look into?
Here you go: https://github.com/eelior/zenstack-zod-model-undefined
While creating this repro I noticed this is happening only in client components, see 2 lasts commits. Updating issue title accordingly.
Thank you @eelior ! Let me look into it. Feel free to find me on Discord 😄
Hi @eelior , sorry for the latest response.
It seems that Next13's app dir has stricter rules about the way modules are exported and required. I'm making a fix, and it'll be included in the v1.5.0 release this week. Thanks for reporting the issue!
Description and expected behavior After following the instructions in the Form Validation blog post, I attempted to use the generated zod models. They seemed to be working correctly at first, but then I encountered a runtime error.
Screenshots If applicable, add screenshots to help explain your problem.
Environment:
Additional context I have searched everywhere but couldn't find a similar issue. would greatly appreciate any help or direction in debugging it. 🙏🏽