"babelHelpers.interopRequireDefault不是函数"升级到React Native 0.16.0-rc时 [英] "babelHelpers.interopRequireDefault is not a function" when upgrading to React Native 0.16.0-rc

查看:759
本文介绍了"babelHelpers.interopRequireDefault不是函数"升级到React Native 0.16.0-rc时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我升级到react-native 0.16.0-rc,运行npm install,然后运行react-native升级.尝试在模拟器(或设备,无关紧要)中启动iOS应用时,出现错误:

I upgraded to react-native 0.16.0-rc, ran npm install, then ran react-native upgrade. When trying to launch the iOS app in a simulator (or device, doesn't matter) I get the error:

[错误] [tid:com.facebook.React.RCTExceptionsManagerQueue]未处理的JS异常:babelHelpers.interopRequireDefault不是函数. (在"babelHelpers.interopRequireDefault(_reactNative)"中,"babelHelpers.interopRequireDefault"未定义)

[error][tid:com.facebook.React.RCTExceptionsManagerQueue] Unhandled JS Exception: babelHelpers.interopRequireDefault is not a function. (In 'babelHelpers.interopRequireDefault(_reactNative)', 'babelHelpers.interopRequireDefault' is undefined)

我这里的想法几乎用完了.我可能需要添加一些东西到我的xcode项目中吗?将最新的反应本机模板合并到我的数据库中是一场噩梦,因此可能有些事情搞砸了.

I've just about run out of ideas here. Is there something I need to add to my xcode project maybe? Merging the latest react-native templates into mine was a nightmare so maybe something got messed up there.

推荐答案

在此Github中讨论了此问题提交 .您可以暂时应用此修补程序,直到将其与版本0.16合并到项目中为止.

This problem is discussed in this Github issue and fixed by this commit. You can apply this patch temporarily until it is merged into the project with the version 0.16.

这篇关于"babelHelpers.interopRequireDefault不是函数"升级到React Native 0.16.0-rc时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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