1

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.

1
  • So if react-router needs react-0.13 - install v0.13. Otherwise it's not clear what your actual problem is: you either satisfy the version requirements, or you don't have packages working/installing properly. Commented Oct 15, 2015 at 22:20

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks @nick, this fixes the problem for react-router. What can I do specifically for react-bootstrap and redbox-react and broadly speaking,in general to avoid the issue?
Hm, does react 0.14.0 not satisfy the requirements for those other modules?
I reinstalled react-bootstrap and redbox-react after uninstalling the existing versions which were complaining about the peer dependencies and it works. Thanks Nick, I will accept the answer and close this question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.