大家好,我是新手,对本地人做出反应,并开始学习上周的反应。
但是现在我坚持反应问题 - 本机矢量图标没有正确安装,我不知道为什么会发生这种情况。我没有得到确切的问题
这是我的package.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 install react-native-vector-icons时 我收到以下错误
`-- UNMET PEER DEPENDENCY react-native-vector-icons@^4.0.0
npm WARN react-native-material-ui@1.12.0 requires a peer of react-native-vector-
icons@^4.0.0 but none was installed.
请帮我安装材料ui和vecctor图标
答案 0 :(得分:0)
如警告中所述,您需要在安装材料ui之前向package.json添加矢量图标。
"react-native-vector-icons": "^4.0.0"
答案 1 :(得分:0)
您可以在package.json中更新react-native-vector-icon的版本,如:
"react-native-vector-icons": "^4.0.0",
我希望这可以帮到你。