resolvers: ESLint error: Unable to resolve path to module '@hookform/resolvers'
Shows an ESLint error says Unable to resolve path to module '@hookform/resolvers'
. I can use the resolver without any issue, just a lint error.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (12 by maintainers)
nice @snmgian thanks for saving all of us! publish the patch now.
My app’s build process was running and ok, and the app was also running ok. Only eslint was complaining. When I faced those errors in the past, it was related to a package not being installed properly or not being installed at all.
As package.json tells where’s the file that is going to be imported, my first step was to look at the package.json. Then I found the missing
dist/
path injsnext:main
.As
eslint-plugin-import
uses jsnext:main entry, I tested it locally by fixing that path, run the linter again with no errors this time.use validationSchema for v5
const schema = // your schema
const {register, handleSubmit} = useForm({
validationSchema: schema
})
@actual-size v5 doesn’t need resolver, resolver is for v6 😃
Hi. Removed
node_modules
and installed again, but same as before. I imported like below and the error is gone.