WARN [email protected] requires a peer of react@~15.3.1 but none was installed.

react-native init的時候出現問題:

報錯信息

npm WARN [email protected] requires a peer of react@~15.3.1 but none was installed.

解決方案:

方法一:npm install -save react@~15.3.1

方法二:在package.json中可以添加依賴

"dependencies": {
"react": "^15.3.2",
"react-native": "^0.35.0",
"react-native-orientation": "^1.17.0",
"react-native-scrollable-tab-view": "^0.6.0",
}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章