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

你可能感兴趣的:(Failed to load bundle: Cannot read property 'throwIfClosureRequired' of undefined)