How to Fix Nodemon Not Restarting on Code Changes

SoraSora
1 min read

If you're experiencing issues with Nodemon not restarting automatically after making code changes, here's a solution that worked for me:

  1. Open your terminal in Visual Studio Code and use Bash, as it's a Unix-based CLI.

  2. Navigate to the directory containing your files using the cd command.

  3. Run Nodemon with the -L flag by typing: nodemon -L.

This approach leverages the legacy watch mode, which can resolve issues with file change detection. Thanks to the helpful community on Stack Overflow for this tip!

1
Subscribe to my newsletter

Read articles from Sora directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Sora
Sora