Skip to content
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

[Chore] Fix our peer dependency warnings #418

Open
arcanis opened this issue Aug 29, 2019 · 3 comments
Open

[Chore] Fix our peer dependency warnings #418

arcanis opened this issue Aug 29, 2019 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@arcanis
Copy link
Member

arcanis commented Aug 29, 2019

We have various peer dependency warnings displayed when running yarn install inside our own repository. It would be great if we could fix the upstream packages to stop it from happening, as it's a matter of time before it causes more serious issues:

image

Given a warning:

X doesn't provide Y requested by Z

The best fix is generally to either:

  • Upgrade the faulty package in our codebase to get rid of the warning. Some of those may have already been fixed.

    • For example, upgrading Gatsby might fix the 2.0.0-printer-fix.2 error.
  • Mark Y as an optional peer dependency in Z, if Z doesn't need Y to work. If Z's maintainers are concerned about potential warnings being shown to their users, tell them that optional peer dependencies are supported by Yarn, npm 6.1+, and pnpm. It's a feature they should use.

  • Add Y as a peer dependency of X. This will move the warning up by one level, but by doing this it's possible that the peer dependency will be met in a satisfying way. For example, if react-bar as a peer depencency on react and is a dependency of react-foo, then you can add react to the peer dependencies of react-foo. Then it'll be up to whoever depends on react-foo to depends on react as well.

    • For example, I strongly suspect it's the case of jest-jasmine2 which should have a peer dependency on jest-haste-map.
  • Add Y as regular dependency of X if it's just a matter of a peer dependency having been omitted by mistake.

    • For example, html-react-parser should probably have regular dependencies on both object-assign and fbjs to satisfy the requirements of react-dom-core.
@jj811208
Copy link
Contributor

jj811208 commented Oct 5, 2022

This PR will fix both warnings: #4935

➤ YN0060: │ @yarnpkg/monorepo@workspace:. provides eslint (pf82c3) with version 8.2.0, which doesn't satisfy what @yarnpkg/eslint-config and some of its descendants request
➤ YN0002: │ acceptance-tests@workspace:packages/acceptance-tests doesn't provide jest (pcc8ab), requested by jest-json

these are all gatsby related, many repositories have been archived and we can't do anything about them.

but these will no longer be a problem after #4851, I believe we have a reason to leave them alone

➤ YN0002: │ gatsby-cli@npm:3.14.0 [7243a] doesn't provide ink (p4a7fc), requested by gatsby-recipes
➤ YN0002: │ gatsby-plugin-manifest@npm:3.7.0 [118b2] doesn't provide graphql (p0cd4a), requested by gatsby-plugin-utils
➤ YN0002: │ gatsby-plugin-page-creator@npm:3.14.0 [7243a] doesn't provide graphql (pd3e76), requested by gatsby-plugin-utils
➤ YN0060: │ gatsby-recipes@npm:0.25.0 [bb88b] provides graphql (pc0633) with version 15.5.0, which doesn't satisfy what graphql-subscriptions 
➤ YN0002: │ gatsby@npm:3.14.0 [118b2] doesn't provide babel-eslint (p70342), requested by eslint-config-react-app
➤ YN0002: │ react-instantsearch-dom@npm:6.6.0 [118b2] doesn't provide algoliasearch (p65251), requested by algoliasearch-helper
➤ YN0002: │ react-instantsearch-dom@npm:6.6.0 [118b2] doesn't provide algoliasearch (p5ab0d), requested by react-instantsearch-core
➤ YN0002: │ @endemolshinegroup/cosmiconfig-typescript-loader@npm:3.0.2 [714f3] doesn't provide typescript (p88d18), requested by ts-node
➤ YN0002: │ @yarnpkg/gatsby@workspace:packages/gatsby doesn't provide @emotion/core (pa19bb), requested by gatsby-plugin-mdx
➤ YN0002: │ @yarnpkg/gatsby@workspace:packages/gatsby doesn't provide webpack (pe1aa2), requested by gatsby-plugin-favicon

I found some PRs about this:
algolia/algoliasearch-helper-js#746
algolia/react-instantsearch#2811
EndemolShineGroup/cosmiconfig-typescript-loader#133
Creatiwity/gatsby-plugin-favicon#65


These are all the warnings we have, I think we can close this issue, or remove the first-good-issue tag to prevent people from spending time on it, and wait for a successful conversion to docusaurus

@ArchitGajjar
Copy link

Hi @arcanis can you please assign this to me ?

@ArchitGajjar
Copy link

NVM, I think @jj811208 already have fixed this in his PR above 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants