Use declared lodash dependencies. Resolve build failures for dependen… #1366
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…t projects using Yarn PnP.
Reasons for making this change
Dependent projects using react-jsonschema-form and Yarn PnP fail to build with the following exception:
The important parts of this are:
Documentation on troubleshooting this error message from Yarn PnP is provided here:
https://yarnpkg.com/en/docs/pnp/troubleshooting#toc-is-trying-to-require-without-it-being-listed-in-its-dependencies
Ultimately, the situation boils down to this:
NPM and Yarn w/o PnP are forgiving, and can resolve packages if they are placed as dependencies by this project's dependencies (not by this project itself!). This is what is happening today. The existing
lodash/get
andlodash/pick
dependencies used in Form.js are not declared in package.json.@arcanis
Checklist