Add @emotion/react@11.8.1 as a peer dependency#115
Merged
Conversation
jonahallibone
approved these changes
May 6, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This starts with #73 which points out that when multiple instances of
@emotion/reactare installed, you receive the following warning:Before
react-select@5.3.1, the versions of@emotion/reactrequired by Chakra UI and React Select were largely compatible (^11.0.0vs.^11.1.1). In the most recent version ofreact-selecthowever, they bumped their@emotion/reactdependency to^11.8.1, the third most recent version. This means that it is far more likely that users of this package will run into issues with having multiple versions of@emotion/react.The easiest way to prevent multiple versions of
@emotion/reactfrom being installed and this error being thrown is by keeping your project's dependency for@emotion/reactat least as high as the minimum version required by both of these packages. This will allow the NPM cli to de-dupe the package, removing this warning. In order to ensure that this happens,@emotion/reactwill now be included as a peer dependency, with the minimum version set to the lowest common version across Chakra UI and React Select.If you're running into this error, run one of the following commands to install a compatible version of
@emotion/react:If for any reason you can't update your package to use
@emotion/react@11.8.1, you can install this package using the--legacy-peer-depsflag, but it's not the preferred way to go.