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?
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 –
- STEP 2: In the File Watchers dialog that opens double click on the ‘Pug/Jade’ entry as shown below –
- STEP 3: In the Pug/Jade File Watcher edit window which opens up, you will need to enter the path to the
jade.cmdfile in your system in the ‘Program’ field as shown below –
- Although the exact path to
jade.cmdwill 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.