# Solution: Declaration issue with @hookform/resolvers/zod in 8- Schema based Validation with Zod

**URL:** <https://forum.codewithmosh.com/t/solution-declaration-issue-with-hookform-resolvers-zod-in-8-schema-based-validation-with-zod/27930>\
**Category:** React\
**Created:** [July 28, 2024, 4:18pm UTC](https://forum.codewithmosh.com/t/solution-declaration-issue-with-hookform-resolvers-zod-in-8-schema-based-validation-with-zod/27930 "2024-07-28T16:18:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amintriton](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/amintriton/32/14282_2.png) [@amintriton](https://forum.codewithmosh.com/u/amintriton)\
**Post date:** [July 28, 2024, 4:18pm UTC](https://forum.codewithmosh.com/t/solution-declaration-issue-with-hookform-resolvers-zod-in-8-schema-based-validation-with-zod/27930/1 "2024-07-28T16:18:10Z")

</div>

If any of you ran to the same issue as me where you get declaration error on line `import { zodResolver } from "@hookform/resolvers/zod";`, ignore the versions that Mosh used and re-install zod and hookform/resolvers using their @latest version. It worked for me!

---

<div class="post-metadata">

**Author:** ![theorion](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/theorion/32/7783_2.png) [@theorion](https://forum.codewithmosh.com/u/theorion)\
**Post date:** [July 28, 2024, 4:34pm UTC](https://forum.codewithmosh.com/t/solution-declaration-issue-with-hookform-resolvers-zod-in-8-schema-based-validation-with-zod/27930/2 "2024-07-28T16:34:39Z")

</div>

I used latest versions on all dependencies, there are some problems with syntax changes. But it’s worth learning new versions, it all works if you troubleshoot.
