You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Behavior
When building a React Native application with Metro, @babel/plugin-transform-flow-strip-types throws TypeError: comments is not iterable. When that is fixed, @babel/plugin-transform-react-jsx starts throwing TypeError: file.ast.comments is not iterable.
Hey @AlicanC! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.
I've encountered exactly this issue and can confirm that adding checks for Array.isArray(comments) and Array.isArray(file.ast.comments) to plugin-transform-flow-strip-types and plugin-transform-react-jsx fixes the issue. Here's my babel.config.js:
Bug Report
Current Behavior
When building a React Native application with Metro,
@babel/plugin-transform-flow-strip-types
throwsTypeError: comments is not iterable
. When that is fixed,@babel/plugin-transform-react-jsx
starts throwingTypeError: file.ast.comments is not iterable
.An occurrence of this problem can be found here: react-navigation/react-navigation#4983
Input Code
This PNG file: https://github.com/react-navigation/react-navigation/blob/22926c52303da8f329c4b130cb1bbe606eb7d74c/src/views/assets/back-icon.png
Expected behavior/code
Expected not to error.
Babel Configuration (.babelrc, package.json, cli command)
Environment
Possible Solution
PR #8701
The text was updated successfully, but these errors were encountered: