Add @emotion/react@11.8.1 as a peer dependency #115
Merged
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/react
are installed, you receive the following warning:Before
react-select@5.3.1
, the versions of@emotion/react
required by Chakra UI and React Select were largely compatible (^11.0.0
vs.^11.1.1
). In the most recent version ofreact-select
however, they bumped their@emotion/react
dependency 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/react
from being installed and this error being thrown is by keeping your project's dependency for@emotion/react
at 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/react
will 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-deps
flag, but it's not the preferred way to go.