-
Notifications
You must be signed in to change notification settings - Fork 4
[Web] Dependency conflict: @autoform/react v4.0.0 requires outdated @hookform/resolvers version #95
Description
Description
While installing dependencies for my project, npm fails with a dependency resolution conflict involving @autoform/react and @hookform/resolvers.
The installation succeeds only when using:
npm install --legacy-peer-deps
This indicates a mismatch between the peer dependency requirements of @autoform/react and the latest version of @hookform/resolvers.
Error Log
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: convoai-v2@1.8.5
npm ERR! Found: @hookform/resolvers@5.2.2
npm ERR! node_modules/@hookform/resolvers
npm ERR! @hookform/resolvers@"^5.2.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @hookform/resolvers@"^3.9.0" from @autoform/react@4.0.0
npm ERR! node_modules/@autoform/react
npm ERR! @autoform/react@"^4.0.0" from the root project
Cause
The project uses @hookform/resolvers ≥ v5.
@autoform/react@4.0.0 still requires:
"peerDependencies": {
"@hookform/resolvers": "^3.9.0"
}
This peer dependency constraint is outdated and incompatible with the current version of React Hook Form + resolvers.
Steps to Reproduce
- Create a basic React project
- Install dependencies including @autoform/react & the latest @hookform/resolvers
- Run:
npm install
Observe the dependency conflict (ERESOLVE).
Expected Behavior
@autoform/react should support the latest versions of react-hook-form and @hookform/resolvers
Installation should succeed without requiring --legacy-peer-deps or --force
Actual Behavior
npm install fails due to incompatible peer dependency requirements
Only works when bypassing dependency resolution using:
npm install --legacy-peer-deps
Suggested Fix
Update @autoform/react peerDependencies to support newer versions:
"@hookform/resolvers": ">=5.0.0"
(or ensure compatibility with the latest hookform ecosystem)
Alternatively, publish a new version aligned with current resolver versions.
Environment
macOS
npm v9+
Node.js v18+
React project using @hookform/resolvers v5+