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

Workers causing webpack infinite build loop #16245

Closed
Jarred-Sumner opened this issue Aug 17, 2020 · 2 comments
Closed

Workers causing webpack infinite build loop #16245

Jarred-Sumner opened this issue Aug 17, 2020 · 2 comments

Comments

@Jarred-Sumner
Copy link

Bug report

Describe the bug

webpack or worker-loader is consistently going into an infinite build loop for me. I'm not sure why. I've spent a few hours investigating and so far, I think its related to workers because if I remove worker-loader, it builds successfully.

This happens on both Webpack v5 and Webpack v4, and Next.js canary, 9.5.2 , and 9.4.5.

There are no errors being shown, so its pretty difficult to debug :(

When running next dev with DEBUG=*, eventually the console prints this line until the next dev process OOMs:
image

If I remove the custom babel.config.js, it doesn't show that line anymore, but it still OOMs.

It seems like babel is building a file repeatedly. The code doesn't do anything like trying to import itself, so I'm not really sure why/how this can happen.

I tried adding lots of logging to worker-loader and that seems to be where its getting stuck. I see it rebuilding the same worker file. There's also a React Refresh boundary in the code for the worker, which makes me wonder if this is possibly related to #12753.

Is anyone else seeing an issue like this?

To Reproduce

I'm honestly not sure how I'd reproduce this yet :(

@Jarred-Sumner
Copy link
Author

I switched the web worker-related code away from using Next.js and into a separate webpack config. I didn't make other code changes, and it works now

@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
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

2 participants