vamsiampolu
vamsiampolu

Reputation: 6642

How to fix npm peer dependency issue?

I have a package.json that has the following modules that are conflicting:

  1. react-router which needs react 0.13.x

  2. redbox-react which needs react@>=0.13.2 || ^0.14.0-rc1

I just did an npm install react and it installed [email protected]

I am trying to install react-bootstrap which needs react@>=0.14.0.

I have been a few solutions:

  1. delete node_modules from all the node_modules of dependencies every time I update

  2. delete and reinstall all modules every time you face an issue

  3. upgrade to npm 3.x which is still pre-release and

What is a good way of fixing these issues without having to do 1 or 2 which is npm version agnostic.

P.S.: All the modules referred to here have been installed locally.

Upvotes: 1

Views: 1046

Answers (1)

nick
nick

Reputation: 19824

Ensure you have the latest version of react-router (currently 1.0.0-rc3).

The react module is only listed as a dev dependency, and the requested version is 0.14.0 so there shouldn't be any issues.

Upvotes: 1

Related Questions