Better Handling of react-addons dependencies
Problem description
Unable to do correct npm install when new versions of React and React Addons are released.
Steps to reproduce
Create a new app that uses exact versions of react and material-ui for example 0.15.1. When installing Material you will see that there is an unmet peer dependency react@^15.2.1 because react-addons-create-fragment and react-addons-transition-group depend on it.
Versions
0.15.2
Description
The issue comes from the fact that react-addons-create-fragment and react-addons-transition-group dependencies have been updated to ^15.2.0 but react dependency is not. You should either update react to ^15.2.0 as well or move the addons as peer dependencies so that they can be controlled in user space,

First time installed node / npm and while installing material-ui I got a lot of warning, is that my fault?
Tried both nodejs 4.4.7 and 6.3.1, the following is from 6.3.1:
C:\Users\Lawrence\material-test>npm install material-ui
C:\Users\Lawrence\material-test
+-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- UNMET PEER DEPENDENCY react@^15.3.0
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | | +-- [email protected]
| | | | | `-- [email protected]
| | | | `-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| `-- [email protected]
| `-- [email protected]
| `-- [email protected]
+-- UNMET PEER DEPENDENCY react@^15.0.0
+-- UNMET PEER DEPENDENCY react-dom@^15.0.0
`-- UNMET PEER DEPENDENCY react-tap-event-plugin@^1.0.0
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Lawrence\material-test\package.json'
npm WARN [email protected] requires a peer of react@^15.0.0 but none was installed.
npm WARN [email protected] requires a peer of react-dom@^15.0.0 but none was installed.
npm WARN [email protected] requires a peer of react-tap-event-plugin@^1.0.0 but none was installed.
npm WARN [email protected] requires a peer of react@^15.3.0 but none was installed.
npm WARN [email protected] requires a peer of react@^15.3.0 but none was installed.
npm WARN [email protected] requires a peer of react@^0.14.0 || ^15.0.0 but none was installed.
npm WARN material-test No description
npm WARN material-test No repository field.
npm WARN material-test No README data
npm WARN material-test No license field.
@rhythnic a im stuck on the same issue. You fould a nice way to get through that?
Im trying to find versions that dont give those UNMET PEER DEPENDENCY but no solution so far. Is hard to make the versions work well for the dependencys as well. Some times even when i have the package that they want i still get the error.
@zetos Here's our dep setup... Hope that helps.
"material-ui": "0.15.3",
"react": "~15.3.0",
"react-addons-pure-render-mixin": "~15.3.0",
"react-dom": "~15.3.0",
@rhythnic i was trying to make it work with react-native .
For me the setup that worked is:
"material-ui": "^0.15.0", "react": "15.3.0", "react-dom": "15.3.0", "react-native": "0.32.0-rc.0",
Why is this closed? The issue persists
@anton-aleksandrov Could you give use more detail? That's an old thread now.
@oliviertassinari Here's a sample case showing the issue https://gist.github.com/harriha/8fb29e3e08e9d07f8fc944f5ff70bdff , ran into this recently in my project.
Not sure myself what would be the best way to fix this. One suggestion might be, since react and react-addons-* live apparently somewhat hand-in-hand in terms of version number ranges, to have react-addons-* in peerDependencies along with react itself. A bit more hassle for a material-ui user to install those, but at least the control for version numbers would be in hands of the host project owner. Need to remember after all that the host project might need to use exact version numbers. Shrinkwrapping helps here, but as seen from the gist, if doing that at wrong time, it fails to work (if latest versions of react libs have matured to next minor range).
Not sure myself what would be the best way to fix this.
@harriha Would installing [email protected] and [email protected] on your side solve the issue?
A bit more hassle for a material-ui user to install those, but at least the control for version numbers would be in hands of the host project owner.
That could be a good solution to solve the problem. We do no longer have the react-addons-create-fragment dependency on the next branch. I'm not sure we need it anyway on the master branch.
I think that we can move react-addons-transition-group as a peerDependency in the next branch 👍 .
@harriha Would installing [email protected] and [email protected] on your side solve the issue?
Yes, that fixes this issue.
I think that we can move react-addons-transition-group as a peerDependency in the next branch
Alright, sounds good. As said, I'm not clear on what would be the perfect solution overall, but I believe that will resolve at least this issue here, hope it doesn't introduce any new ones!
@harriha Well, I think that we should wait for what Facebook is going to do with add-ons. I have seen that they plan to drop the support of some of them and to give them to the community. I'm closing.