The nodemon clean exit – waiting for changes before restart message suggests that “nodemon has detected that your Node.js application has stopped without errors.” It is now in a waiting state, monitoring your files for any changes. It will restart your application once it detects a change in any of the monitored files.
Nodemon is a utility that will monitor for any changes in your Node.js application and automatically restart the server. This is helpful in development as it helps developers not manually restart their Node.js application every time they make a change.
Common reasons for the message
Here are some possible reasons why the Node.js application might exit with a clean exit code:
- Your application has finished executing its tasks.
- Your application has been explicitly exited by calling the process.exit() function with an exit code 0.
- A signal, such as SIGINT or SIGTERM, has terminated your application.
How do you fix the message or error?
- Check the logs for your application to see if there are any errors or warnings.
- Try to reproduce the issue by running your application manually without using nodemon.
- If you are unable to reproduce the issue, try restarting your computer.
I hope you understand the message, why it occurs, and how to handle it.