@hookform/resolvers
is unable to find superstruct
when it's hoisted to the root-level and superstruct
remains in the workspace
#711
Labels
Describe the bug
@hookform/resolvers
is unable to findsuperstruct
when it's hoisted to the root-level andsuperstruct
remains in the workspace. This likely impacts other validation packages due to it being more of a Node-resolution problem but focussing on the Superstruct example for now.To Reproduce
You can run the following commands in a fresh directory. I used Node v20.15.0, NPM v10.7.0 for these tests.
Observe at the end you get:
Expected behavior
@hookform/resolvers
should be able to resolve thesuperstruct
module. Re-run the above set of commands without installingsuperstruct@^1
at the root-level and the test script does not error.Additional context
Perhaps the API should be modified to accept the relevant validation package. For example, that might look like:
The text was updated successfully, but these errors were encountered: