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.34k stars 1.74k forks source link

nodemon does not restart the server ([nodemon] restarting due to changes...) #2201

Closed philip045 closed 3 months ago

philip045 commented 6 months ago

Expected behaviour

Restart the server when changing the server codes fsdfdsfdsfs

Actual behaviour

when i use app.listen() function in express.js , nodemon not work and must rerun it, please help me and i do all solution in internet, and not worked... Capturefdsfdsf

Steps to reproduce


If applicable, please append the --dump flag on your command and include the output here ensuring to remove any sensitive/personal details or tokens.

remy commented 6 months ago

Your server (unrelated to node) is not releasing the port, so it's not restarting.

Try running nodemon with --spawn flag, i.e. nodemon --spawn - not sure it'll make any difference, but there's not much to go on here, and I'm fairly sure there's something specific about your setup that's blocking the stopping of the process.

A couple of extra things you can try:

  1. Change the port (you're reading the process.env.PORT)
  2. Try running without nodemon (on the original port) and then do ctrl+c in the terminal (don't close the terminal in VS Code, just send the keys) - see what happens.
github-actions[bot] commented 5 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

github-actions[bot] commented 4 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

github-actions[bot] commented 3 months ago

Automatically closing this issue due to lack of activity