Skip to content

Unmet peer dependency warning when the peer dependency is installed at the same time #2132

Closed
@fson

Description

@fson

Bug

What is the current behavior?

Installing a dependency and its peer dependency at the same time generates a warning "Unmet peer dependency" even though the peer dependency is installed.

Steps to reproduce:

> mkdir test
> cd test
> yarn init -y
> yarn add react react-dom
yarn add v0.17.10
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning Unmet peer dependency "react@^15.4.1".

On the other hand, first running yarn add react and then yarn add react-dom doesn't create any warnings.

What is the expected behavior?

No warnings about peer dependencies should be printed when other packages specified in the add command will satisfy the peer dependencies.

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

Node.js v6.9.1
Yarn 0.17.10
macOS 10.12.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions