Nodemon: Nodemon not restarting if main file has no extension

Created on 8 Sep 2016  路  8Comments  路  Source: remy/nodemon

I have a js file without extension and when it's content changes nodemon doesn't restart it. I saw that we can specify file extension list but shouldn't the main file be supported with a shebang?

Any ideas how to fix this?

stale

Most helpful comment

I fould a workaround:

$ nodemon --watch file-without-extension file-without-extension

All 8 comments

It's not a great answer, if this is a node project, you can give it an extension, and just alias inside of your package.json (the same way nodemon does). If it's not鈥m not sure. Sorry.

I fould a workaround:

$ nodemon --watch file-without-extension file-without-extension

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

This problem does still exist. The workaround is fine but it is an unexpected problem regardless

@aalexgabi The issue with that workaround is nodemon will no longer watch parent directories (using --watch /bin/www appears files outside bin are not watched).

I created some node-based githooks and was using nodemon to rerun on changes. I added a lib folder with some shared code.
when I run nodemon -w .githooks/ .githooks/pre-commit nodemon catches changes in .githooks/* but does not restart when .githooks/pre-commit is changed

I then tried nodemon -w .githooks/pre-commit. This sees changes to .githooks/pre-commit but nothing else.

I then tried nodemon -w .githooks/pre-commit -w .githooks/ .githooks/pre-commit. This sees changes to .githooks/* but not changes to .githooks/pre-commit

Frustrating...

So it should be re-opened, right?

Happy to reopen with a PR.

Was this page helpful?
0 / 5 - 0 ratings