[英]React Native - Failed to load bundle in iOS
下面的链接中提供了几种解决方案。 请尝试它们。
https://github.com/facebook/react-native/issues/21310
for now after react-native init, since a lot of new changes are coming out, this fix worked for me (I got it from reading other issues):
with npm:
npm install --save-dev @babel/core
npm install --save-dev @babel/runtime
or with yarn:
yarn add --dev @babel/core
yarn add --dev @babel/runtime
if on ios you get _this._registerEvents is not a function, after a successful build
do
npm run start --reset-cache
or
react-native start --reset-cache
对我来说,我现在有一些问题的原因,因为很多新的变化正在出现,比如 Xcode 10 本身是新的,而 react native 尚未与它合并,这个修复对我有用:
使用 npm:
npm install --save @babel/runtime
或用纱线:
纱线添加@babel/runtime
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.