如何解决'纱线包有未满足的同伴依赖' [英] how to resolve 'yarn package has unmet peer dependency'

查看:311
本文介绍了如何解决'纱线包有未满足的同伴依赖'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于未满足的peerDependencies,当我运行 yarn upgrade install 时,我收到大量警告。

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".

据我所知,列出的软件包需要依赖项,而我项目中的另一个软件包具有依赖项,我可以找到deps但我找不到任何关于如何将所述包指向我知道存在的子依赖的信息。

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?

推荐答案

这两个警告都是关于对等依赖,这意味着你的应用程序的责任将这些包作为依赖项提供。

Both warnings are about peer dependencies, which means that it's your application's responsability to provide those packages as dependencies.

在这种情况下 graphql @ babel / core 预计将安装在您的根应用程序中。

In this case graphql and @babel/core are expected to be installed in your root app.

这篇关于如何解决'纱线包有未满足的同伴依赖'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆