-
Notifications
You must be signed in to change notification settings - Fork 178
'channel closed' on watch #287
Comments
I'm experiencing the same problem when running at-loader version: 3.0.0-beta.9 |
I am also having this issue but only for a larger project. |
Hello everybody. It's very hard to debug things on Windows if you don't have one (webpack doesn't play well with virtualized environments), so I will appreciate any help with debugging. And it also will be helpful to know more about your environments:
|
Sorry, here is my environment. OS: Mac OS X El Capitan |
Completely forgot to put that on the initial issue:
|
|
@s-panferov Has this info helped you reproduce the issue? |
I'm also experiencing this problem on the latest Webpack 2 / TypeScript 2 releases (on macOS Sierra - Node 6.x) I'm not too experienced with child process handling but I think the cause is either that the child process dies too soon or doesn't die at all... These are usually the causes of the "channel closed" error. I've tried playing with hooking on to For reference: |
@FrozenPandaz neither I can reproduce the issue for all this time, nor my colleagues which use the loader. I think I need to add some debug logging. |
Just published a new version with more error handling. Please try 3.0.0-beta.10 and report errors if any. |
@s-panferov Tried it with
No other errors are being logged. It seems it has to do with webpack running multiple concurrent builds. I put a reproducible case here: https://github.com/declandewet/awesome-ts-loader-bug Just run |
I can confirm that I am also getting the error only when I use multiple concurrent builds in webpack.config.js. |
@declandewet thanks for the example. I'll try to figure it out. |
When exporting an array of configs from webpack.config.js, atl crashes. The error message is "channel closed", indicating that a forked child process is dying too soon. This commit changes the Channel class such that it sends a SIGTERM to the child process rather than a SIGKILL. The child process intercepts this signal and ignores it to ensure it is kept alive. Closes s-panferov#287
When exporting an array of configs from webpack.config.js, atl crashes. The error message is "channel closed", indicating that a forked child process is dying too soon. This commit changes the Checker class such that it's kill method sends a SIGTERM to the child process rather than a SIGKILL. The child process intercepts this signal and ignores it to ensure it is kept alive. Closes s-panferov#287
@declandewet thanks for the investigation. I've found the main reason for that behavior. It's because I have several possibilities to fix this:
|
Whenever webpack detects a change, the following happens:
This is with
[email protected]
with the simplest of configs:The text was updated successfully, but these errors were encountered: