[英]npm UNMET PEER DEPENDENCY appears to be wrong
I'm trying to npm install simple-react-bootstrap-navbar
into my project. 我正在尝试将
simple-react-bootstrap-navbar
安装到我的项目中。
My project has react 15.1.0 as a dependency. 我的项目已将15.1.0作为依赖项做出反应。
simple-react-bootstrap-navbar
has "react": ">=0.14.0",
as a devDependency. simple-react-bootstrap-navbar
具有"react": ">=0.14.0",
作为devDependency。
Yet, when I install, I get this error/warning 然而,当我安装时,我收到此错误/警告
I'm installing simple-react-bootstrap-navbar
with the --save flag, so react should definitely be a peer dependency satisfying >=0.14.0
. 我正在使用--save标志安装
simple-react-bootstrap-navbar
,因此反应肯定应该是满足>=0.14.0
的对等依赖>=0.14.0
。
So what is causing this error, and how do I fix it? 是什么导致了这个错误,我该如何解决?
I'm on npm 3.9.3 and Node 4.4.4 我在npm 3.9.3和Node 4.4.4上
This is just a guess but if you look closely, you'll see the failing peer: 这只是一个猜测,但如果仔细观察,你会看到失败的同伴:
Even if you somehow managed to install react@15.1.0
, react-redux@4.4.0
is explicitly not compatible with it. 即使您以某种方式设法安装
react@15.1.0
, react-redux@4.4.0
明显与它不兼容。 I'm not sure which version of React you really have but the two packages you have ( simple-react-bootstrap-navbar
and react-redux@4.4.0
) want different React versions so they conflict. 我不确定你真正拥有哪个版本的React,但是你拥有的两个软件包(
simple-react-bootstrap-navbar
和react-redux@4.4.0
)需要不同的React版本,因此它们会发生冲突。
The solution is simple: install react-redux@latest
first. 解决方案很简单:首先安装
react-redux@latest
。 Compatibility with react@15.x
was added in react-redux@4.4.1
. 与兼容性
react@15.x
在加入react-redux@4.4.1
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.