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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

37-5b82c79181d94cdf.js:1 Uncaught (in promise) TypeError: number 0 is not iterable (cannot read property Symbol(Symbol.iterator)) #40889

Closed
1 task done
tohsaka888 opened this issue Sep 26, 2022 · 11 comments

Comments

@tohsaka888
Copy link

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Binaries:
Node: 16.17.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 12.3.1
eslint-config-next: 12.3.1
react: 18.2.0
react-dom: 18.2.0

What browser are you using? (if relevant)

chrome 105.0.5195.127

How are you deploying your application? (if relevant)

next start,vercel, netlify

Describe the Bug

When i use next start or use vercel/netlify to deploy my website,i got an error in console.
image

image

When i switch next.js to version 12.3.0,it does't have any error.

Expected Behavior

no error.

Link to reproduction

https://codesandbox.io/s/github/tohsaka888/coder-home

To Reproduce

first, build the application.

run next start.

see the console, it will have an error.

click, this button.

image

it will have another error.

repo

@tohsaka888 tohsaka888 added the bug Issue was opened via the bug report template. label Sep 26, 2022
@balazsorban44
Copy link
Member

From the looks of it, this might be an SWC minifier bug, but I cannot reproduce it currently, as the reproduction just produces CORS errors.

Could you try to create a more minimal reproduction of the issue? That would mean removing anything that is not directly contributing to the issue that you see. pages, APIs, packages, etc.

Can you try setting the swcMinfy: false option in your next.config.js to see if it makes a difference?

@tohsaka888
Copy link
Author

From the looks of it, this might be an SWC minifier bug, but I cannot reproduce it currently, as the reproduction just produces CORS errors.

Could you try to create a more minimal reproduction of the issue? That would mean removing anything that is not directly contributing to the issue that you see. pages, APIs, packages, etc.

Can you try setting the swcMinfy: false option in your next.config.js to see if it makes a difference?

Thanks for your reply.When i switch swcMinify to false, the error is missing.

I think this error is acturally caused by SWC,should i close the issue?

@angelbeatsying
Copy link

when i upgrade to Next version 12.3.1, meet the same problem. when i use next/router jump to login page

@balazsorban44
Copy link
Member

@tohsaka888 if it's an SWC bug, we still need to investigate to be able to fix the issue.

@balazsorban44 balazsorban44 added kind: bug and removed bug Issue was opened via the bug report template. labels Sep 27, 2022
@balazsorban44
Copy link
Member

@angelbeatsying could you link to your minimal reproduction? 🙏

@tohsaka888
Copy link
Author

@balazsorban44 Maybe the version 12.3.1 of next.js is conflict with antd Menu component.When i remove the Menu of antd,the error is missing.By the way,the error is just occured in production mode.

@balazsorban44
Copy link
Member

The error occurring only in production (deployed or next build && next start) means that it's a minifier bug since we don't minify in development (next dev).

Thanks for trying to narrow the problem down. Minimizing the reproduction repository is important for us to be able to identify the bug. If you have time to do so, please try removing any unnecessary code (pages, components, API, etc.) that does not contribute to the issue and post a simplified reproduction. 🙏 I tried yesterday, but your repository gave different errors than before, likely because you have pushed some new commits to it.

@tohsaka888
Copy link
Author

@balazsorban44 I create a new repo to reproduce the error.Just use antd Menu component then i build this project and start it,you will see the error in console.

@balazsorban44
Copy link
Member

Thanks! I could now confirm that the issue is fixed on the latest canary release! You can test it by running npm i next@canary, or wait for the fix to appear in the latest release.

@tohsaka888
Copy link
Author

Thanks! I could now confirm that the issue is fixed on the latest canary release! You can test it by running npm i next@canary, or wait for the fix to appear in the latest release.

Thanks for your help!

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants