How to Fix nodemon clean exit – waiting for changes before restart

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:

  1. Your application has finished executing its tasks.
  2. Your application has been explicitly exited by calling the process.exit() function with an exit code 0.
  3. A signal, such as SIGINT or SIGTERM, has terminated your application.

How do you fix the message or error?

  1. Check the logs for your application to see if there are any errors or warnings.
  2. Try to reproduce the issue by running your application manually without using nodemon.
  3. 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.

Related posts

[nodemon] app crashed – waiting for file changes before starting

zsh: command not found: nodemon

npm WARN package.json: No repository field

Unsupported engine node / NPM only when building in Docker