JB Header
Node.js How to resolve error An exception occurred while executing watcher 'Pug/Jade'. Watcher has been disabled.
This quick error resolution tip shows how to resolve the error An exception occurred while executing watcher ‘Pug/Jade’ when using File Watchers with Jade template files in Node.js/Express.js projects in WebStorm IDE.

Are you getting the following error when doing changes to a Jade template file in WebStorm IDE?
An exception occurred while executing watcher 'Pug/Jade'. Watcher has been disabled. Fix it.: Invalid executable

Above error occurs when a File Watcher has been specified for a Jade file type in WebStorm but the link to the Jade executable(jade.cmd) is incorrectly defined or missing in the Jade(or Pug)File Watcher settings.

Resolution for the above error encountered with Jade File Watcher instance in WebStorm
  • STEP 1: Click on the link named "Fix it" in the error message shown in WebStorm event log window as shown below -
    Jade File Watcher Error Resolution in WebStorm - Step 1
  • STEP 2: In the File Watchers dialog that opens double click on the 'Pug/Jade' entry as shown below -
    Jade File Watcher Error Resolution in WebStorm - Step 2
  • STEP 3: In the Pug/Jade File Watcher edit window which opens up, you will need to enter the path to the jade.cmd file in your system in the 'Program' field as shown below -
    Jade File Watcher Error Resolution in WebStorm - Step 3
  • Although the exact path to jade.cmd will vary from system to system depending on the actual installation location, but the path will most likely be similar to this on Windows systems - C:\Users\<user-name>\AppData\Roaming\npm where <user-name> is your windows login username.