I am trying to deploy some minor changes to an app which uses the AISDK but i’m getting build errors:
Attempted import error: ‘ZodFirstPartyTypeKind’ is not exported from ‘zod’ (imported as ‘ZodFirstPartyTypeKind’).
According to the build logs this is coming from the AISDK library and I can’t seem to fix it.
Anyone else seeing this? Only started happening today.
We’re working on a fix for this
Zod 4 was published yesterday and v0 switched automatically to using it because it uses "zod": "latest"
But the AI SDK has a dependency on zod-to-json-schema which has not updated to Zod 4 yet and is incompatible, so you get this error
The fastest unblock would be to download/git sync your code and manually downgrade zod, then deploy through CLI/Vercel
We’ll get this fixed on our end as soon as we can
1 Like
Thanks Jacob.
It ended up being the MCP SDK forcing the Zod 4 dependency. Luckily we didn’t really need it for what we were doing so we able to find another way and were able to remove it which fied our deployment issue.
1 Like