最近使用React Native遇到一些问题,加载的时候报throwIfClosureRequired
,之前没有遇到过,百度也找不到,哪肯定就是React Native又升级之后出现的,于是在Issues中发现.奉上React Native Issues地址和throwIfClosureRequired
解决方案地址
React Native Issues
1. Failed to load bundle: Cannot read property 'throwIfClosureRequired' of undefined
https://github.com/facebook/react-native/issues/18962
版本问题,安装babel-preset-react-native
4.0.0的版本
"devDependencies": {
...
"babel-preset-react-native": "4.0.0",
...
},
2. no bundle URL present
如果npm start
已经执行,并开启了服务。运行ios时还是出现以下问题,一般需要删除ios文件夹下的build文件夹。如果不能解决,欢迎提问
网友评论