zod 4 support
i recently upgraded to zod 4 and upgraded all mastra packages as a i saw zod 4 is supported now.
i am now running in this issue when running
mastra dev
10 Replies
this is very critical for an update we're trying to push out. would appreciate promptness. here are my dependencies:
📝 Created GitHub issue: https://github.com/mastra-ai/mastra/issues/8258
GitHub
[DISCORD:1421605038505070632] zod 4 support · Issue #8258 · mastr...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1421605038505070632 i recently upgraded to zod 4 and upgraded all mastra packages as a i saw zod 4 is supp...
Hi @leo ! Could you share a small repro example? Thanks 🙏
do you guys have a template i could base it off of?
If it's easily reproducible when using a fresh project created using
npm create mastra@latest then you can just use that directly. You can also give us the steps to reproduce from a project created with npm create mastra@latest if that's easier. (depending on the bug, the template project is sometimes not good enough (e.g. monorepos)okay will do that but zod 4 should work with the regular release right? theres no special tag or release i need to use?
It should work out of the box, if it doesn't then there is most likely a bug 😉
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
@salamanderxing your case seems like it could be a zod version mismatch issue. if you just upgraded make sure you don't have any zod 3 references in your mono repo or in any of your node_modulse
I had this issue too, ended up solving it by upgrading the Zod 4 versions in our mono repo from 4.0.x to 4.1.x
Pretty sure this PR fixd it https://github.com/colinhacks/zod/pull/5121