react-native-vector-icons使用时遇到的问题
error: bundling failed: Error: While resolving module `react-native-vector-icons/Ionicons`, the Haste package `react-native-vector-icons` was found. However the module `Ionicons` could not be found within the package. Indeed, none of these files exist:
* `/Users/user/Documents/react_navigation_redux_app/node_modules/react-native/local-cli/core/__fixtures__/files/Ionicons(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)`
* `/Users/user/Documents/react_navigation_redux_app/node_modules/react-native/local-cli/core/__fixtures__/files/Ionicons/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)`
按照gitthub使用教程配置好项目之后,却始终报错,
原因可能是React-Native,React,react-native-vector-icons的版本问题。
解决方法删除/node_modules/react-native/local-cli/core/__fixtures__/files目录下的package.json文件即可。删除前最好备份该文件!
网友评论