Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
44
rated 0 times [  49] [ 5]  / answers: 1 / hits: 103048  / 10 Years ago, mon, november 3, 2014, 12:00:00

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?


More From » webpack

 Answers
16

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:



  • rebooting the computer

  • checking the disk and repairing permissions via Disk Utility

  • adding the folder to Spotlight privacy list (the list of folders to not index), and then removing from it, effectively forcing a reindexing

  • renaming the folder, and then possibly renaming it back

  • re-creating the folder and moving the old contents back into it


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.


[#68936] Thursday, October 30, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
adriannemyiag

Total Points: 504
Total Questions: 105
Total Answers: 99

Location: Ecuador
Member since Thu, Apr 22, 2021
3 Years ago
adriannemyiag questions
;