2017-07-18 132 views
0

大家好,我是新來的本地人,並開始學習上週的反應。[email protected]需要react-native-vector- [email protected]^4.0.0.0的同行,但沒有人安裝

但現在我停留在問題的反應,本機矢量圖標未正確安裝,我不知道爲什麼它發生的事實。我沒有得到什麼確切的問題

這裏是我的包以.json

{ 
"name": "ephotobook", 
"version": "0.0.1", 
"private": true, 
"scripts": { 
"start": "node node_modules/react-native/local-cli/cli.js start", 
"test": "jest" 
}, 
"dependencies": { 
"react": "16.0.0-alpha.12", 
"react-native": "0.46.3", 
"react-native-icons": "^0.7.1", 
"react-native-material-ui": "^1.12.0" 

}, 
"devDependencies": { 
"babel-jest": "20.0.3", 
"babel-preset-react-native": "2.1.0", 
"jest": "20.0.4", 
"react-test-renderer": "16.0.0-alpha.12" 
}, 
"jest": { 
"preset": "react-native" 
} 
} 

當我運行NPM安裝的反應,本機矢量圖標 我得到以下錯誤

`-- UNMET PEER DEPENDENCY [email protected]^4.0.0 

npm WARN [email protected] requires a peer of react-native-vector- 
[email protected]^4.0.0 but none was installed. 

請幫我安裝這兩種材質U我和vecctor圖標

+0

在素材ui之前添加''react-native-vector-icons「:」^ 4.0.0「,依賴關係 –

+0

謝謝解決了問題 –

回答

0

正如在警告中提到的,您需要在安裝材質UI之前將矢量圖標添加到package.json。

"react-native-vector-icons": "^4.0.0"

+0

如果您發現有用並將問題作爲問題關閉,您可以標記爲接受答案已解決 –

0

你可以在你的package.json像更新反應母語矢量圖標的版本:

"react-native-vector-icons": "^4.0.0", 

希望這可以幫助你。

相關問題