Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
philip045 opened this issue May 7, 2024 · 2 comments
Labels
not a bug / external to nodemon An issue that is outside of nodemon specific to environment stale no activity for 2 weeks

Comments

@philip045
Copy link

  • Versions:
  • nodemon -v :latest
  • Operating system/terminal environment (powershell, gitshell, etc): powershel
  • Using Docker? What image: no
  • Command you ran: nodemon server.js

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
Copy link
Owner

remy commented May 19, 2024

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.

@remy remy added specific to environment not a bug / external to nodemon An issue that is outside of nodemon labels May 19, 2024
Copy link

github-actions bot commented Jun 2, 2024

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 github-actions bot added the stale no activity for 2 weeks label Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not a bug / external to nodemon An issue that is outside of nodemon specific to environment stale no activity for 2 weeks
Projects
None yet
Development

No branches or pull requests

2 participants