You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently react-dom and react-native are listed as optional peer dependencies of react-redux, but they are only listed in peerDependenciesMeta and not in peerDependencies. Looking at the RFC for optional peer dependencies in Yarn v2, I'm pretty sure the correct way is to list them in both fields: yarnpkg/rfcs#105 (comment)
Consistent with this, I'm seeing yarn v2 (with pnp) complaining that A package is trying to access another package without the second one being listed as a dependency of the first one, even when react-dom is a dep of the react-redux's direct ancestor.
Happy to provide a PR and\or a repro if you'd like!
This is for backwards compatibility with versions of npm/yarn that don't support peerDependenciesMeta. If we add them to peerDependencies, there will be a warning emitted for every installation (since you shouldn't have both packages). By putting them in peerDependenciesMeta, package managers that support the field will assume both are optional.
Even if we implemented the fields fully, it doesn't actually represent what we want: one of the two is required to be installed. That hasn't yet been added to the spec.
Currently
react-dom
andreact-native
are listed as optional peer dependencies of react-redux, but they are only listed inpeerDependenciesMeta
and not inpeerDependencies
. Looking at the RFC for optional peer dependencies in Yarn v2, I'm pretty sure the correct way is to list them in both fields:yarnpkg/rfcs#105 (comment)
Consistent with this, I'm seeing yarn v2 (with pnp) complaining that
A package is trying to access another package without the second one being listed as a dependency of the first one
, even whenreact-dom
is a dep of thereact-redux
's direct ancestor.Happy to provide a PR and\or a repro if you'd like!
redux: 4.0.5
react-redux: 7.2.0
react-dom: 16.12.0
The text was updated successfully, but these errors were encountered: