Skip to content

[Bug?]: Incorrect peer dependency violation reported #5826

Closed

Description

Self-service

  • I'd be willing to implement a fix

Describe the bug

I'm in the process of updating monodeploy for compatibility with Yarn 4. When running yarn, I receive a YN0060 report (which I've elevated to an error using logFilters) telling me:

react is listed by your project with version 18.2.0, which doesn't satisfy what gatsby requests (but they have non-overlapping ranges!)

There is no peer hash that I can pass into yarn explain peer-requirements. When I inspect the manifest of the version of gatsby I'm using (yarn npm info gatsby@4.25.7), I see:

  peerDependencies: {
    react: '^16.9.0 || ^17.0.0 || ^18.0.0 || ^0.0.0',
    'react-dom': '^16.9.0 || ^17.0.0 || ^18.0.0 || ^0.0.0'
  },

which clearly satisfies React 18.2.0.

To reproduce

(The sherlock link is broken)

Environment

System:
    OS: macOS 13.6
    CPU: (8) arm64 Apple M1 Pro
  Binaries:
    Node: 18.18.0 - /private/var/folders/5m/4x2x5y6x5x5ck7rnpzq23dlc0000gn/T/xfs-39f35603/node
    Yarn: 4.0.0 - /private/var/folders/5m/4x2x5y6x5x5ck7rnpzq23dlc0000gn/T/xfs-39f35603/yarn
    npm: 9.8.1 - ~/.nvm/versions/node/v18.18.0/bin/npm

Additional context

Full Yarn install output:

➤ YN0000: · Yarn 4.0.0
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 226ms
➤ YN0000: ┌ Post-resolution validation
➤ YN0060: │ react is listed by your project with version 18.2.0, which doesn't satisfy what gatsby requests (but they have non-overlapping ranges!).
➤ YN0086: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 274ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed
➤ YN0000: · Failed with errors in 0s 702ms

and output of yarn explain peer-requirements | grep "doesn't" | grep react:

➜  monodeploy git:(yarn_4) yarn explain peer-requirements | grep "doesn't" | grep react
➤ YN0000: p370be → @monodeploy/gatsby@workspace:gatsby doesn't provide @types/gatsby to gatsby-plugin-react-helmet
➤ YN0000: pbf20d → @monodeploy/monorepo@workspace:. doesn't provide @types/eslint to eslint-plugin-react-hooks
➤ YN0000: pc89e2 → @monodeploy/monorepo@workspace:. doesn't provide @types/eslint to eslint-plugin-react
➤ YN0000: p6606f → @monodeploy/monorepo@workspace:. doesn't provide @types/eslint-plugin-react to @tophat/eslint-config
➤ YN0000: p569b3 → @monodeploy/monorepo@workspace:. doesn't provide @types/eslint-plugin-react-hooks to @tophat/eslint-config

The commit where I'm trying to run yarn: https://github.com/tophat/monodeploy/tree/a092300308a811109c85bb11202b906285ab2d27

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions