-
Notifications
You must be signed in to change notification settings - Fork 181
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
Silent freeze if source imports non-existant module #368
Comments
I made an automated test bench that reproduces this at various versions of watchify. The test bench uses the source and gulpfile as said previously. What it tests for specifically is for the process being frozen. The way it works is as follows:
My results are as follows:
I did not test on versions prior to |
Here's a diff between
|
I just ran the test bench on the same versions range, but this time using In |
So the workaround is to use version |
Looks like the root cause may be an issue with the implementation of a fix done years ago: track updating status to remove race condition that deletes watchers Commenting out |
The offending line of code is specifically |
If
browserify
is given thewatchify
plugin, it will silently freeze if there's an import of a non-existent module anywhere in the source files reachable viaentries
.I've isolated a minimal complete reproducible example:
src.js:
gulpfile.js:
What I expect to happen is for an error to be thrown. I should see it either in
.on('error', console.error)
or by the gulp task crashing. What happens in practice is that the task freezes without printing anything.If the
watchify
plugin is removed from the chain, then the task continues and errors successfully:which is expected, because I removed the babel transform from the example to keep it minimal. If babel is added, then
dst.js
is successfully generated as long aswatchify
is not used.This happens to me on:
The text was updated successfully, but these errors were encountered: