Skip to content

Unmet peer deps with workspaces #5810

@sky87

Description

@sky87

Do you want to request a feature or report a bug?

Bug

What is the current behavior?
In workspaces, peerDependencies that are also present as devDependencies are reported as unmet.

If the current behavior is a bug, please provide the steps to reproduce.
Clone https://github.com/sky87/unmet-peer-deps-issue, run

$ yarn
yarn install v1.6.0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "workspace-aggregator-b6d53714-1712-40de-af51-af5d0487ed3e > a@1.0.0" has unmet peer dependency "react@^16.0.0".
warning "workspace-aggregator-b6d53714-1712-40de-af51-af5d0487ed3e > a@1.0.0" has unmet peer dependency "react-dom@^16.0.0".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 4.49s.

What is the expected behavior?
Yarn should not issue a warning.

Notice that without workspaces everything works as expected.

$ rm -rf node_modules &&  mv package.json _package.json &&  cd packages/a && yarn
yarn install v1.6.0
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 2.04s.

Please mention your node.js, yarn and operating system version.

$ yarn -v
1.6.0
$ node -v
v9.3.0
$ ver
Microsoft Windows [Version 10.0.16299.431]

Metadata

Metadata

Assignees

Labels

cat-bugfixed-in-modernThis issue has been fixed / implemented in Yarn 2+.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions