-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug?]: Yarn ignores peerDependencies
in workspace package
#6364
Comments
peerDependencies
in workspace package
A workspace has no parent from its general perspective, so it doesn't provide any peer dependency (until it gets used as a dependency of another package). You need to also list expo/react-native as |
@arcanis Thank you for taking a look at this! I'm not sure I fully understand your answer though. I'm not doing anything at the workspace level, it's only within one of the sub-packages. Shouldn't it be enough to specify (I'm not calling |
Workspaces have two perspectives (sets of dependencies):
Even if workspaces depending on |
That makes sense! I appreciate the thorough explanation 🙇♂️ |
Faced the same issue and could not figure it out for a long time. IMHO |
Self-service
Describe the bug
After upgrading from
4.1.1
to4.3.1
I'm now getting an error that one of the packages in my Yarn workspace is failing to provide a package that a dependency declares as peer.But I already have that package in the
peerDependencies
key of mypackage.json
. It's as if Yarn is ignoring that field. Could it be related to the work done by @clemyan in #6205 ?Here's the error:
And in the
package.json
for@baqhub/sdk-expo
:To reproduce
expo-secure-store
to one of the packages.expo
as a peer dependency to that package.yarn
, get a warning indicating that the package should provide the peer dependency.Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: