react-native run-ios。加载捆绑包失败

时间:2018-10-08 21:55:27

标签: reactjs react-native react-native-ios

我知道之前曾有人问过这个问题,但是经过数天试图弄清楚这个问题,我还是很困惑。我一直关注https://github.com/facebook/react-native/issues/18962React-Native: Failed to load bundle. Cannot read property 'throwlfClosureRequired'

的帮助

不幸的是,在按照以下步骤尝试了不同的方法之后,我仍然无法正常工作。

我从以下位置更改了package.json:

"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.48.0",
"react-test-renderer": "16.5.0"

"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"babel-preset-react-native": "4.0.0",
"react-test-renderer": "16.5.0"

我尝试删除node_modules并进行npm安装。我已经多次重启计算机,但仍然无法正常工作

react-native-cli: 2.0.1
react-native: 0.57.2
OS: macOS High Sierra 10.13.6
yarn: 1.10.1
watchman: 4.9.0
node: 9.6.1
npm: 6.4.1
xcode: 10.0

任何帮助将不胜感激!请让我知道是否可以提供更多有用的信息。

1 个答案:

答案 0 :(得分:1)

更新:我终于可以通过进入我的项目文件夹并执行以下命令来使其工作:“ yarn upgrade react-native@0.57.1​​”