问题
I get a load of warnings when I run yarn upgrade
or install
because of unmet peerDependencies.
warning " > apollo-link-http@1.5.9" has unmet peer dependency "graphql@^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0".
warning " > babel-loader@8.0.4" has unmet peer dependency "@babel/core@^7.0.0".
As I understand it, the listed packages need the dependency, and another package in my project has the dependency, I can find the deps but I can't find any information about how to direct the said packages to the sub dependency that I know exists.
How can I get yarn to quiet down and show it where these deps are?
回答1:
Both warnings are about peer dependencies, which means that it's your application's responsability to provide those packages as dependencies.
In this case graphql
and @babel/core
are expected to be installed in your root app.
来源:https://stackoverflow.com/questions/53947699/how-to-resolve-yarn-package-has-unmet-peer-dependency