how to resolve 'yarn package has unmet peer dependency'

橙三吉。 提交于 2019-12-14 00:23:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!