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

Next.js ^11.1.1 : webpack error + bundling step timeout #17992

Closed
g10 opened this issue Sep 6, 2021 · 8 comments · Fixed by #18189
Closed

Next.js ^11.1.1 : webpack error + bundling step timeout #17992

g10 opened this issue Sep 6, 2021 · 8 comments · Fixed by #18189

Comments

@g10
Copy link

g10 commented Sep 6, 2021

Current behavior

Using the create next app webpack 5 example setup, with "next": "latest" that resolves to ^11.1.1.

Result in a TypeError and a timeout on the bundling step

✖ 「wdm」: TypeError: Cannot read property 'traceChild' of undefined
...
ℹ 「wdm」: wait until bundle finished: /__cypress/src/index.html

Desired behavior

No response

Test code to reproduce

create next app webpack 5 example setup with "next": "latest" (11.1.1 or 11.1.2)

Cypress Version

^8.3.0

Other

workaround / temporary solution :

use exact version at 11.1.0

"next": "11.1.0"

tnx #17883 (comment)

@danielweil
Copy link

Same error in Next version 11.1.2

@ZachJW34
Copy link
Contributor

ZachJW34 commented Sep 21, 2021

I was able to reproduce this issue @g10. After some digging, I found that Next added tracing (collecting performance metrics) to many of it's internal Webpack plugins in 11.1.1. This is a breaking change since for us since we use their default webpack config and don't specify a trace. The fix should be pretty straight-forward but Next currently doesn't export any of the tracing code so I'll followup with the Next team to see if they can export what we need.

Edit: Nvm I found the deep export I was looking for. I have a PR to fix this here #18189

@cypress-bot cypress-bot bot added stage: work in progress stage: needs review The PR code is done & tested, needs review and removed stage: work in progress stage: needs review The PR code is done & tested, needs review labels Sep 21, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 24, 2021

The code for this is done in cypress-io/cypress#18189, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@pbilyk
Copy link
Contributor

pbilyk commented Oct 26, 2021

Hello, sorry for bumping this up but I see that the fix for this was first merged and then got reverted. Is there any ETA for it?

@ZachJW34
Copy link
Contributor

@pbilyk Sorry for the confusion. I believe there was a merge that reverted and re-added this commit. Latest master contains the changes so using the latest version of @cypress/react will have the fix for this issue.

@pbilyk
Copy link
Contributor

pbilyk commented Oct 26, 2021

Thanks! Seems to work with next 11. But they had to go and release next 12, where it stopped working again 😅

@ZachJW34
Copy link
Contributor

Of course it did 😭. Feel free to create an issue about Next 12 not working!

@pbilyk
Copy link
Contributor

pbilyk commented Oct 26, 2021

FYI: I just found a root cause and made a PR #18648

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

Successfully merging a pull request may close this issue.

5 participants