-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unmet peer dependency 'react-router' despite having 'react-router-dom' #250
Comments
@supasate Is there any code in |
+1 For this. According to the docs here: https://github.com/ReactTraining/react-router/tree/master/packages/react-router#installation , user would install either |
I'm having the same issue, and I have to admit that I don't really get if the problem is on So, this is my warning:
And since I'm using Should I always add Man, I would be very happy to understand that, haha |
you can ignore this warning because react-router is installled along with react-router-dom, you can check in your node_modules and you'll find react-router directory |
I had the same issue, not just the common unmet dependency error, the error is in the Chrome console and bundle build too. |
AFAIK, the peer dependencies npm/yarn check only looks if they are specified in the top level of your package.json. It won't be satisfied if there is a private dependency like that of react-router inside react-router-dom. More explanation here: https://stackoverflow.com/questions/26737819/why-use-peer-dependencies-in-npm-for-plugins It's kind of a flaw in the package managers that they don't give a package author the ability to specify one package or a completely different one. But this problem also came about with how the authors of react-router split up their packaging. Maybe the author(s) of connected-react-router should just switch over the peer-dependency to the one that most people are using (react-router-dom) rather than the safe bet that is react-router? |
I'm getting a warning during package installations saying the following:
connected-react-router@6.2.2" has unmet peer dependency "react-router@^4.3.1"
However, I have
react-router-dom
as a dependency already which installsreact-router
. It seems to be working correctly, but it feels like a bug thatconnected-react-router
doesn't realize I have a package which installreact-router
.Please advise.
The text was updated successfully, but these errors were encountered: