Description
Hi team! 👋
While working on a personal project, I encountered persistent import issues with @hookform/resolvers/zod:
Cannot find module '@hookform/resolvers/zod'
Environment
- Bundler: Vite / Next.js
- TypeScript: 5.x
- Zod: v4+
- react-hook-form: v7+
What I tried
- Reinstalling
@hookform/resolvers
- Different import styles
- Checking tsconfig moduleResolution settings
Workaround
I ended up creating a minimal standalone resolver as a workaround: zod-resolver-lite
It's just ~50 lines that:
- Handles nested array paths (
items[0].name)
- Supports
criteriaMode: "all"
- Uses only non-deprecated Zod v4 APIs
Not a complaint!
I'm not asking for changes—just sharing in case:
- Others hit the same issue
- It helps with documentation or troubleshooting guides
- There's something obvious I missed that could help others
Thanks for the amazing library! ❤️
Description
Hi team! 👋
While working on a personal project, I encountered persistent import issues with
@hookform/resolvers/zod:Cannot find module '@hookform/resolvers/zod'
Environment
What I tried
@hookform/resolversWorkaround
I ended up creating a minimal standalone resolver as a workaround: zod-resolver-lite
It's just ~50 lines that:
items[0].name)criteriaMode: "all"Not a complaint!
I'm not asking for changes—just sharing in case:
Thanks for the amazing library! ❤️