nodemon: Nodemon doesn't restart on file delete
nodemon -v: 2.0.4node -v: v14.2.0- Operating system/terminal environment: Linux Ubuntu 20.04
- Using Docker? What image: N/A
- Command you ran: N/A
Expected behaviour
According to this issue, Nodemon should restart when a file is deleted as it does when a file is added.
Actual behaviour
Nodemon doesn’t restart at all. I’m unsure if this feature was added at some point and then removed or if this is a problem with my setup but I’ve not been able to get Nodemon to restart on file deletion.
It works just fine when I edit or add files.
Is there a workaround for this?
Steps to reproduce
- Have Nodemon watch your project root:
- Delete a file
- Nodemon doesn’t restart
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 17 (7 by maintainers)
@remy Could this issue be solved by adding
here: https://github.com/remy/nodemon/blob/main/lib/monitor/watch.js#L85
It seems to match what chokidar is using: https://github.com/paulmillr/chokidar/blob/master/lib/constants.js#L12
I personally think it’s fine for you to not fix it, but you keep bringing up the fact that nobody submitted a PR. Put in the perspective of this repo being 10 years old, I think 24 days is a really small window to give for a PR to be submitted. It’s also possible that people just decided to use something like onchange instead, or in combination (as I did)
In my decade of using nodemon, I’ve never needed the functionality. In that same time this issue was raised, but apparently (as you said) not important enough to warrant anyone wanting to change nodemons behaviour.
So, I guess, you’re right.
So nodemon not reacting to file deletion is not an important issue?
@JGJP noted, but that’s just you. I’ve been running this project for a decade and only added the stalebot in the last 19 months. There’s been 2 or maybe 3 significant fixed by people who aren’t me. Also, I do judge and add not stale on important issues (you can see this). So, like I said, noted, but I’m afraid these are my rules for making this project even vaguely manageable.
Sorry but why was this closed? This seems to be a valid issue and I’m experiencing the same issue with directories and files being added also.