Failed to load bundle: Cannot read property 'throwIfClosureRequired' of undefined

屏幕快照 2018-04-23 下午12.46.39.png

如图:
解决方案:
首先:Open your package.json and change the devDependencies to:

"devDependencies": {
...
"babel-preset-react-native": "4.0.0",
...
},
Then run npm install.
如果以上方法不行的话,则再进行如下操作:
For those who have updated the "babel-preset-react-native" to version "4.0.0", and still seeing the issue:

Run npm install again, before running the app with react-native run-android or react-native run-ios
If you still see the issue, clear 'node_modules' directory, run rm -rf node_modules/ from your project directory and repeat step 1.
PS:本人通过第二种方案解决已经OK

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容