'babelHelpers.asyncToGenerator不是函数'错误 [英] 'babelHelpers.asyncToGenerator is not a function' error
问题描述
要像在android上一样加载应用程序.
App to load as it does on android.
错误:babelHelpers.asyncToGenerator is not a function
OS: macOS Sierra 10.12.1
Node: 7.9.0
Yarn: 0.20.3
npm: 4.2.0
Watchman: 4.9.0
Xcode: Xcode 8.3.3 Build version 8E3004b
Android Studio: 2.3 AI-162.4069837
推荐答案
检查您的.babelrc
文件.它包括babel transform-async-to-generator
插件吗?如果是这样,请将其删除. React Native包括的babel帮助程序不包括该转换的帮助程序.我不确定如何在不生成一组新辅助程序并将其包括在您的版本中的情况下添加它.
如果该插件不在您的babel配置中,则可能是您正在使用的库依赖项之一具有它.
Check your .babelrc
file. Is it including the babel transform-async-to-generator
plugin? If so, remove it. The babel helpers that React Native includes do not include the helper for that transform. I'm not sure how to add it without generating a new set of helpers and including them in your build.
If that plugin is not in your babel config, maybe one of the library dependencies you are using has it.
这篇关于'babelHelpers.asyncToGenerator不是函数'错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!