React-Native:无法加载包.无法读取属性“throwlfClosureRequired" [英] React-Native: Failed to load bundle. Cannot read property 'throwlfClosureRequired'
问题描述
应用程序安装并打开,但在打开时会出现此红色屏幕并显示以下错误消息.
The app installs and opens but right when it opens this red screen appears with the below error message.
TBH 我不太确定我在做什么,我真的需要一些帮助.我能够让我的另一个项目工作,但是当我开始我的第二个项目时,在尝试运行代码时出现了这个问题.代码只是你运行时得到的基本代码:react-native init projectName
TBH I am not quite sure what I am doing and I really need some help. I was able to get my other project to work but when I started my second project this came up when trying to run the code. The code is just the basic code you get when you run: react-native init projectName
推荐答案
将babel-preset-react-native"的版本改为4.0.0".对于最新版本 5.0.0,出现问题.
Change the version of "babel-preset-react-native" to "4.0.0". For the lastest version 5.0.0, the issue arises.
- 在版本更改后运行 npm install.然后启动模拟器.
- 即使遇到问题,也请删除 node_modules 目录,重复步骤 1.
- 如果您在所有尝试后再次看到问题,请重新启动您的机器.
检查 github 问题
这篇关于React-Native:无法加载包.无法读取属性“throwlfClosureRequired"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!