I tried running webpack --watch
and after editing my JS files, it doesn't trigger an auto-recompilation.
I've tried reinstalling webpack
using npm uninstall
but it's still not working.
Any ideas?
FYI: it seems OS X can have a folder get corrupted and no longer send fsevents
(which watchpack
/chokidar
/Finder uses) for itself and any child folders. I can't be sure this is what happened to you, but it was very frustrating for me and a colleague.
We were able to rename the corrupt parent folder and then watch events immediately came through as expected. See this blog post for more info: http://livereload.com/troubleshooting/os-x-fsevents-bug-may-prevent-monitoring-of-certain-folders/
The recommended fixes from the above link are:
First two did not work for us, didn't try the Spotlight suggestion, and the re-creation did not prove necessary.
We were able to find the root problem folder by opening Finder and creating files in each successive parent folder until one showed up immediately (since Finder will get hosed by this bug as well). The root-most folder that does not update is the culprit. We just mv
'd it and mv
'd it back to its original name, and then the watcher worked.
No idea what causes the corruption, but I'm just glad to have a fix.