Open jmcclell opened 7 years ago
Hm, I can't reproduce this on Darwin but my guess is this has something to do with fsevents not working properly on Linux. Maybe related to #14. I'll try to reproduce this in a couple weeks, but any chance you could dig into what is a good replacement for fsevents (or a way to make nodemon work) on Linux?
@saikat Ah, I should have commented and closed this. Lack of sleep made me forget that I was running in a Vagrant box while modifying locally. I was testing nodemon by itself locally and it was working, meanwhile running my build dev script on the Vagrant box and thus wrongly concluding it must be node-foreman's fault.
For anyone else interested in that particular issue, I found the following solutions:
-L
for nodemon to enable polling and watch your cpu spike for any non-trivally sized projectvagrant plugin install vagrant-fsnotify
. This will forward filesystem events from the host to the guest, but, unfortunately, it causes a double hit on the file as those events propagate back in the NFS/shared folder so if you have an editor that warns you when a file has been modified since last writing.. well.. it's painful.In the end I ditched Vagrant for running the node scripts and just keep it for running the supporting services I need that either don't run well on OSX or that I just don't want to install locally. I surmise a similar issue would exist if using Docker, but haven't tested.
As for your question, @saikat, for Linux you may be able to use inotify
instead? Can't say I've looked into it personally.
Running this setup straight from git on Ubuntu 16.0.4
$npm run dev
Everything works, but nodemon doesn't detect filechanges and doesn't restart. It also seems like things don't shut down correctly with
ctrl-c
as the exit logging is always "Application exited abnormally"Any ideas on how I might debug or are there any known issues here I'm unaware of?