国人的博客写的比较懒,个人从stack
over flow 查找到这个问题,大概就是....
i'm using npm install react-native@0.40.0 --save to upgrade react native, but i keep getting an error that i have an unmet peer dependency react-native@0.40.0.
this confuses me because i thought i had just installed react-native@0.40.0.
those error messages can be really poorly worded. i've seen this same thing; it's reporting that you have react-native@0.40.0 installed, but something else is requesting a different version.
i'd suggest doing an npm ls; it will give you a better picture of all the peer dependency requirements and what's wrong.
thanks, i've tried npm ls, and it appears that i have two conflicting requirements: one for react-native@^0.33.0 and another for react-native@>=0.40. is there any way this can be resolved? – user2421192 jan 8 at 6:58
ouch. unfortunately, i don't think you have a good way to resolve that short of finding dependencies that have compatible react-native dependencies. – jacob jan 8 at 6:59
以上就是xdl@42.0.0" has unmet peer dependency "react@16.0.0-alpha.12 的解决方案的详细内容。