[英]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.