简体   繁体   English

如何解决'yarn package has unmet peer dependency'

[英]how to resolve 'yarn package has unmet peer dependency'

I get a load of warnings when I run yarn upgrade or install because of unmet peerDependencies.由于未满足 peerDependencies,我在运行yarn upgradeinstall时收到大量警告。

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.据我了解,列出的包需要依赖项,而我项目中的另一个包有依赖项,我可以找到 deps,但找不到有关如何将所述包定向到我知道存在的子依赖项的任何信息.

How can I get yarn to quiet down and show it where these deps are?我怎样才能让 yarn 安静下来并显示这些 deps 在哪里?

Both warnings are about peer dependencies , which means that it's your application's responsibility to provide those packages as dependencies.这两个警告都是关于peer dependencies的,这意味着您的应用程序有责任将这些包作为依赖项提供。

In this case graphql and @babel/core are expected to be installed in your root app.在这种情况下, graphql@babel/core应该安装在你的根应用程序中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM