Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array destructuring a non-iterable fails obscurely #4377

Closed
vcarl opened this issue Jun 15, 2020 · 2 comments
Closed

Array destructuring a non-iterable fails obscurely #4377

vcarl opened this issue Jun 15, 2020 · 2 comments

Comments

@vcarl
Copy link

vcarl commented Jun 15, 2020

馃悰 bug report

Description of the problem

Array destructuring fails with an obscure Babel helper error. Babel recently improved the error emitted here, so this might be solved by updating deps.

Partial stack trace:

TypeError: arr[Symbol.iterator] is not a function
    at _iterableToArrayLimit (https://5otb7.csb.app/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js:8:39)
    at _slicedToArray (https://5otb7.csb.app/node_modules/@babel/runtime/helpers/slicedToArray.js:8:33)
    at Object.eval (https://5otb7.csb.app/src/index.test.js:14:53)
    at https://codesandbox.io/static/js/vendors~jest-lite.d7cf4386a.chunk.js:1:199229

How has this issue affected you? What are you trying to accomplish?

I was building an interview problem sandbox, and while refactoring a Jest test I hit a wall because of this error. Pointed me to line 1 column 1, I ultimately found it by disabling sourcemaps, hunting through network tab for likely source files, and setting breakpoints until I narrowed it down.

Link to sandbox:

minimal reproduction

minimal Jest reproduction, with broken highlighted line

Your Environment

Software Name/Version
小odesandbox latest
Browser Chrome latest
Operating System MacOS
@vcarl vcarl changed the title Array destructing a non-iterable fails obscurely Array destructuring a non-iterable fails obscurely Jun 15, 2020
@christianalfoni
Copy link
Contributor

Hi there @vcarl and thanks for taking the time to dive into the issue! 馃槃

We will update our babel dependencies and let you know when it is done!

@christianalfoni
Copy link
Contributor

Hi there @vcarl,

Just wanted to say that this is currently a bit down on our list as there is no pressing issue with the babel dependency. Really appreciate this report as it did bump the issue up on our list, but it will probably take a while to get this specific issue fixed... unless we meet a more pressing issue which forces us to put this way up on the list 馃槃

I will close this issue for now, but please reopen if you meet other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants