未插入反应图标

时间:2019-04-03 18:08:12

标签: react-native react-native-vector-icons

我导入图标以进行本机反应时出错

捆绑失败:错误:无法从react-native-vector-icons/ionicons解析模块C:\Users\Zarzu Victor\Application\App.js:急速模块图中不存在模块react-native-vector-icons/ionicons

package.json

{
  "name": "Application",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
  "react": "16.8.3",
  "react-native": "0.59.3",
  "react-native-gesture-handler": "^1.1.0",
  "react-native-vector-icons": "^6.4.2",
  "react-navigation": "^3.6.1",
  "react-navigation-material-bottom-tabs": "^1.0.0"
  },
  "devDependencies": {
  "@babel/core": "7.4.3",
  "@babel/runtime": "7.4.3",
  "babel-jest": "24.7.0",
  "jest": "24.7.0",
  "metro-react-native-babel-preset": "0.53.1",
  "react-test-renderer": "16.8.3"
  },
  "jest": {
  "preset": "react-native"
  }

1 个答案:

答案 0 :(得分:0)

尝试运行链接命令

运行-react-native link react-native-vector-icons

如果问题仍然存在,那么。尝试降级您的reactjs和react-native版本

"react": "16.5.0",
"react-native": "~0.55.2"