Adam Rackis
Adam Rackis

Reputation: 83358

npm UNMET PEER DEPENDENCY appears to be wrong

I'm trying to npm install simple-react-bootstrap-navbar into my project.

My project has react 15.1.0 as a dependency.

simple-react-bootstrap-navbar has "react": ">=0.14.0", as a devDependency.

Yet, when I install, I get this error/warning

enter image description here

I'm installing simple-react-bootstrap-navbar with the --save flag, so react should definitely be a peer dependency satisfying >=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

Upvotes: 4

Views: 1392

Answers (1)

Dan Abramov
Dan Abramov

Reputation: 268245

This is just a guess but if you look closely, you’ll see the failing peer:

Even if you somehow managed to install [email protected], [email protected] is explicitly not compatible with it. I’m not sure which version of React you really have but the two packages you have (simple-react-bootstrap-navbar and [email protected]) want different React versions so they conflict.

The solution is simple: install react-redux@latest first. Compatibility with [email protected] was added in [email protected].

Upvotes: 3

Related Questions