Search code examples
intellij-ideaasset-pipelineinotifyparceljs

Parcel watch doesn't detect changes, but safe-write is off


Symptoms:

  • Starting parcel watch completes the initial build, the command continues running but doesn't detect any further changes

Context:

  • Parcel is being run from an IntelliJ IDEA platform IDE (Rider)
  • Safe-write functionality is disabled, so I am completely sure that the file is actually being changed on disk
    • Problem is reproducible when I edit referenced CSS or JS using a different editor (vim)
  • OS is Ubuntu Linux

Why aren't subsequent changes to files detected by Parcel, triggering a re-build?


Solution

  • IntelliJ-based IDEs have a habit of completely burning through the inotify limit. In my case, setting fs.inotify.max_user_watches in /etc/sysctl.conf to a higher value (524288 in my case, in accordance with the instructions given by JetBrains) and then running sudo sysctl -p --system before restarting parcel watch solved the problem conclusively.