代码之家  ›  专栏  ›  技术社区  ›  ashish.surana

React Native-无法在iOS中加载捆绑包

  •  0
  • ashish.surana  · 技术社区  · 6 年前

    Error Screen on opening of app

    2 回复  |  直到 6 年前
        1
  •  1
  •   Sateesh Yemireddi    6 年前

    下面的链接提供了几种解决方案。请试一试。

    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
    
        2
  •  0
  •   ashish.surana    6 年前

    对于我来说,我得到了一些问题的原因,因为现在出现了很多新的变化,比如Xcode 10本身是新的,react native还没有与之合并,所以这个修复对我很有效:

    使用npm:

    npm安装--保存@babel/runtime

    纱线添加@babel/runtime