New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: undefined is not iterable #9210
Comments
Hey @CaelanStewart! We really appreciate you taking the time to report an issue. The collaborators If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack |
I've been a bit of a div, and prematurely assumed the cause was the for ... of loop. But the inaccurate line numbers in the source maps didn't help. Basically, it was happening because of the Perhaps the error in that circumstance could be a little clearer, plus the reported line number points to the Only issue with all this abstraction is the increased debugging difficulty, due to unreliable error messages and line numbers. Another thing that confused me was the fact that the last two calls on the stack trace are apparently from I definitely made sure it wasn't a cached source map. That damn issue with Chrome caching source maps and not refreshing them on |
Bug Report
I'm not familiar with Webpack's specifies, or Babel's internals, as I'm being lazy and using
laravel-mix
. However, the error I'm receiving seems like a bug in the compiler to me. But you, the experts, can be the judge of that.Current Behaviour
A clear and concise description of the behaviour.
Using
for ... of
in a certain context doesn't work, but it works elsewhere as expected.The error I receive is:
Input Code
This is a method from the containing class. It's a very simple CSS parser (no block support) for a specific use case I have. The whole module can be seen under "Additional Context", below.
Output Code
You didn't ask for it, but I think it may be useful.
Expected behavior/code
I expected it to iterate over the plain JS array, like it does elsewhere I use
for ... of
.Babel Configuration (.babelrc, package.json, cli command)
Unknown. I've not yet forced myself to learn more about what's beneath
laravel-mix
.But whatever
laravel-mix
uses by default, basically.But, as follows, these are the package versions.
Environment
yarn@1.12.3
laravel-mix
Additional context
Add any other context about the problem here. If applicable, add screenshots to help explain.
Here is the whole module:
The text was updated successfully, but these errors were encountered: