Closed peleteiro closed 9 years ago
Hmm, React is already a peerDependency though, so not sure why it would be installed under fluxible-router as well as the top level.
In other news, I can't wait for React 0.14 to solve this context nonsense.
But fluxible is not a peerDependency; React is a peerDependency of fluxible and it gets installed in fluxible-router's node_modules.
This behaviour will change, and peerDependency will not install automatically. But for now...
If you require react in your application, it should get installed there and not in your dependencies. Is that not working? It has been working for us in our flux-examples just fine.
I was requiring react using "react": "~0.13"
, I changed to "react": "0.13.x"
as flexible-router is using and it works.
I lost a couples of hours trying to solve this, I would still put fluxible as a peerDependency but I'm good for now. peerDependency is changing soon any way.
Thank you!
@peleteiro Good to hear that you got it work. peerDependencies
have always been a pain for us too. Out of curiosity, which version of npm are you using? This might help with diagnosing for people with similar issues in the future.
@mridgway 2.7.5, the last one available on brew.
Running two different reacts, even if they are the same versions, causes problems that are hard to debug and understand.
I just had a problem where context weren't passed trough handleRoute.
If I remove
node_modules/fluxible-router/node_modules/react/
it works.I know peerDependency is not a perfect solution, but is the best one available for React components/libraries.
This problem only occurs on server-side, due to the nature of npm, on the client-side you always run only one React.