IOS 版本构建崩溃:TypeError: n.render is not a function.(在“n.render()"中,“n.render"未定义)React Native 0.56 [英] IOS release build crashes: TypeError: n.render is not a function. (In 'n.render()', 'n.render' is undefined) React Native 0.56

查看:39
本文介绍了IOS 版本构建崩溃:TypeError: n.render is not a function.(在“n.render()"中,“n.render"未定义)React Native 0.56的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近升级以响应本机 0.56 .我遇到了很多错误,但我已经修复了大部分错误.但是现在当我尝试在发布模式下运行应用程序时,我收到了这个 js 错误.

I have recently upgraded to react native 0.56 . I have been getting a lot of errors but I have fixed most of it. But now When I try to run the app in release mode I get this js error .

2019-05-01 11:45:00.625 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: TypeError: n.render is not a function. (In 'n.render()', 'n.render' is undefined)

This error is located at:
    in n
dyld_image_header_containing_address(0x10ba6d27d)
dladdr(0x10fcc329b, 0x7f823a8ad560)
dladdr(0x10da4f735, 0x7f823a8ad580)
dladdr(0x10ba3d6b2, 0x7f823a8ad5a0)
dladdr(0x10ba3a40c, 0x7f823a8ad5c0)
dladdr(0x10fcca11c, 0x7f823a8ad5e0)
dladdr(0x10fcc75b5, 0x7f823a8ad600)
dladdr(0x10fcc7a06, 0x7f823a8ad620)
dladdr(0x10ba50cde, 0x7f823a8ad640)
dladdr(0x10ba96a95, 0x7f823a8ad660)
dladdr(0x10ba96813, 0x7f823a8ad680)
dladdr(0x111f655d1, 0x7f823a8ad6a0)
dladdr(0x111f6663e, 0x7f823a8ad6c0)
dladdr(0x111f6db47, 0x7f823a8ad6e0)
dladdr(0x111f6e7c0, 0x7f823a8ad700)
dladdr(0x111f788b8, 0x7f823a8ad720)
dladdr(0x11231563c, 0x7f823a8ad740)
dladdr(0x112315435, 0x7f823a8ad760)
dlsym_internal(0x7f823a875030, _FSURLBeginResourcePropertyCacheAccess)
  dlsym_internal(0x7f823a875030, _FSURLBeginResourcePropertyCacheAccess) ==> 0x13223940a
dlsym_internal(0x7f823a875030, _FSURLSetResourcePropertyForKey)
  dlsym_internal(0x7f823a875030, _FSURLSetResourcePropertyForKey) ==> 0x132236e00
dlsym_internal(0x7f823a875030, _FSURLEndResourcePropertyCacheAccess)
  dlsym_internal(0x7f823a875030, _FSURLEndResourcePropertyCacheAccess) ==> 0x132239517
dyld_image_header_containing_address(0x10b9be832)
dyld_image_header_containing_address(0x10fcc3801)
libc++abi.dylib: terminating with uncaught exception of type NSException

这在通过 react-native run-ios --configuration Release 和通过 Xcode(使用 Release 配置)构建时都会发生.调试工作正常.

This occurs both when building through react-native run-ios --configuration Release and through Xcode (with Release configuration). Debug works fine.

React 原生版本:0.56反应版本:16.4.1Xcode 10.1 版

React-native version: 0.56 React version: 16.4.1 Xcode version 10.1

推荐答案

NeverMind.我通过修复删除 babel.config.js 并将我的 .babelrc 文件修复为

NeverMind. I solved it by fixing my removing babel.config.js and fixing my .babelrc file to

{
  "env": {
    "development": {
      "presets": ["react-native", "@babel/preset-flow"],
      "plugins": [
        ["@babel/plugin-proposal-decorators", { "legacy": true }],
        [
          "@babel/plugin-transform-runtime",
          {
            "helpers": true,
            "regenerator": false
          }
        ]
      ]
    },
    "production": {
      "presets": ["react-native", "@babel/preset-flow"],
      "plugins": [
        ["@babel/plugin-proposal-decorators", { "legacy": true }],
        "transform-remove-console"
      ]
    }
  }
}

这篇关于IOS 版本构建崩溃:TypeError: n.render is not a function.(在“n.render()"中,“n.render"未定义)React Native 0.56的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆