Search code examples
node.jsnodemon

Nodemon -e does not fire with the given extensions


I am trying to add watcher for nodemon for more extensions like js,hbs,

when I run nodemon with those argument nodemon -e js,hbs its should be watch for changes on .js,.hbs files.

There is an output which shows nodemon get those parameters, but nothing happen.

C:\Users\97252\WebstormProjects\web-server\src>nodemon app.js -e js,hbs
[nodemon] 2.0.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,hbs
[nodemon] starting `node app.js`
Server is up on port 3000.

After changing file with extension .js,.hbs its not auto refresh the code at all.


Solution

  • I was running nodemon from the folder src, which mean the js,hbs is not on the current route.

    I have run the nodemon from web-server instand of web-server/src.

    that fixed the problem because the js,hbs files are inside this folder.