我目前正在尝试将我的React Native项目从0.38升级到0.43。react-native-git-upgrade无法工作,因此我尝试手动升级。当我尝试将react升级到@16.0.0-alpha.6时,我得到以下错误:
$ npm install --save react@16.0.0-alpha.6
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "react@16.0.0-alpha.6"
npm ERR! node v4.3.0
npm ERR! npm v2.14.12
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package react@16.0.0-alpha.6 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer react-native@0.38.1 wants react@~15.4.0-rc.4
npm ERR! peerinvalid Peer react-test-renderer@15.4.1 wants react@^15.4.1有没有人对我有什么建议或建议?非常感谢!
发布于 2017-05-08 18:34:08
我今天晚上遇到了这个问题。删除了node_modules和yarn.lock,并运行了全新的纱线安装
发布于 2017-08-14 11:21:14
我也有同样的问题,也许你可以更新节点版本来解决它,而你的节点版本(4.3.0)太旧了,你应该把它更新到最新。

https://stackoverflow.com/questions/43411856
复制相似问题