-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Webpack + thread-loader build errors #4100
Comments
Do you have some example code? It sounds like the application failed to flush the stream before reusing some buffer or exiting. |
No I don't have example code. The application in this case is the 'thread-loader' plugin of Webpack (https://github.com/webpack-contrib/thread-loader). if you think it is a bug of thread-loader, then I'll open an issue there too. |
I opened an issue with thread-loader , where I gave a full repro code |
In the other issue you mention you're using node 16.20.1 but that version of node ships with libuv 1.43.0. As both a node and libuv maintainer: mixing and matching arbitrary versions is not recommended, you do so at your own risk. Sometimes changes in libuv expose latent bugs in node. |
I'm going to close this because there isn't really anything actionable for us here at the moment. Let me know when there's reason to reopen. |
Webpack build using thread-loader fails with random JSON Parsing errors.
This happens because thread-loader is communicating between its workers with inter-process communication using JSON messages. However, those JSON messages get corrupted (and JSON parse fails) and the reason is that the worker sends incomplete messages. Also another error happens a few seconds later: Error EPIPE that seems to be coming from nodejs.
I don't know how exactly thread-loader works, but by reading the code I understand this: There is a worker manager process and some worker processes, which write their messages to the stdout and a the worker manager reads them. It seems that the stdout write hangs or is prematurely EOF'd and the reading never finishes or it finishes with corrupted data which leads to these errors.
By downgrading libuv to 1.44.2, it builds successfully.
The text was updated successfully, but these errors were encountered: