当前位置:首页 > 芯闻号 > 充电吧
[导读]react-native run-android 时,报如下错误:error: bundling failed: Error: While resolving module `react-native

react-native run-android 时,报如下错误:


error: bundling failed: Error: While resolving module `react-native-vector-icons/MaterialIcons`, the Haste package `react-native-vector-icons` was found. However the module `MaterialIcons` could not be found within the package. Indeed, none of these files exist:

 * `/Users/user/my-app/node_modules/react-native/local-cli/core/__fixtures__/files/MaterialIcons(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)`
  * `/Users/user/my-app/node_modules/react-native/local-cli/core/__fixtures__/files/MaterialIcons/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)`


google了下,在网上找到了。

原因可能是React-Native,React,React-native-vector-icons的版本问题。

解决方法:删除这个文件,删前记得备份。

./node_modules/react-native/local-cli/core/__fixtures__/files/package.json


本站声明: 本文章由作者或相关机构授权发布,目的在于传递更多信息,并不代表本站赞同其观点,本站亦不保证或承诺内容真实性等。需要转载请联系该专栏作者,如若文章内容侵犯您的权益,请及时联系本站删除( 邮箱:macysun@21ic.com )。
换一批
延伸阅读
关闭