remy / nodemon

Monitor for any changes in your node.js application and automatically restart the server - perfect for development
http://nodemon.io/
MIT License
26.35k stars 1.74k forks source link

Values supported for --ext option #2218

Closed ankurparihar closed 2 months ago

ankurparihar commented 3 months ago

Hey

I cannot find any documentation for nodemon, wanted to know what are the options supported by --ext flag?

I wanted to enable nodemon for all the files regardless of the type.

remy commented 3 months ago

I've not tried it personally (and am on mobile ATM) but have you tested --ext="*"?

ankurparihar commented 2 months ago

Thanks for reverting, tried with * but it crashed

> nodemon --ext `*` start

[nodemon] 3.1.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: README.md
[nodemon] starting `node css-only-infinite-scroll node_modules nodemon.json package-lock.json package.json start`
node:internal/modules/cjs/loader:1051
  throw err;
  ^

Error: Cannot find module '/home/ankur/workspace/codepen/css-only-infinite-scroll'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.9.0
[nodemon] app crashed - waiting for file changes before starting...

Tried with . and it worked for all files

> nodemon --ext . start

[nodemon] 3.1.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: (all)
[nodemon] starting `live-server . start`
Serving "." at http://127.0.0.1:8080
Ready for changes
Change detected css-only-infinite-scroll/hello.json
[nodemon] restarting due to changes...
[nodemon] starting `live-server . start`
Serving "." at http://127.0.0.1:8080
github-actions[bot] commented 2 months ago

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

remy commented 2 months ago

@ankurparihar just confirming, you've got a work around right (so I can mark as closed)?

I wouldn't have expected the crash the way you were seeing, so I might investigate this all the same.

ankurparihar commented 2 months ago

hi @remy , we've got workaround, closing this