Skip to content

Race condition causing false error messages when deleting a file used in a context on Windows with --watch #5794

@simon-paris

Description

@simon-paris

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
When:

  • You're on windows
  • and your project is very large
  • and you're using --watch
  • and you have many files that are only referenced by a context

And you delete/rename/move one of those files, you might get a false error message like ERROR in ENOENT: no such file or directory, stat '$FILENAME'.

If the current behavior is a bug, please provide the steps to reproduce.
This bug is a race condition, but it's fairly easy to reproduce in any large project by deleting a file that's only referenced by a context. Here's a project that'll reliably reproduce it: race-condition-repro.zip

  1. Run it with webpack entry.js out.js --watch
  2. Delete some of the a.js files at random. Sometimes you'll get an error message.

What is the expected behavior?
The error message shouldn't happen.

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
Webpack 3.6.0
Node 8.1.2
Windows 10. This does not happen on mac.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions