-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restart loop in Linux #609
Comments
Actually, now it gets into a loop even on startup :( So how does watch work when using find? Is it looking at timestamps or doing checksums? If the former, could it be that it's a clock sync issue between the host and the VM? Also, how does it normally resolve the update to move on? |
Isn't the problem you are using |
@bucaran I don't know, in theory you should even be able to use Nodemon for Ruby or Python as far as I understood: https://github.com/remy/nodemon#running-non-node-scripts But it feels like the problem is with the file system change watching subsystem not with what's being executed. Anyway, I wouldn't want to go back to ES5 just to make Nodemon happy, but thanks a lot for taking the time to have a look and the idea! |
Just had a look, I'm using Gulp to watch what to build on the front end, but was trying to use Nodemon specifically to restart the Node server when server side files are changed. So what you're suggesting is to work Nodemon out of the equation and use Gulp (or any other) watch to restart the server "manually"? |
If you are only using
That looks like a bug in the code that sets up the watcher, but could also be a bug in your end if you are causing any mutations inside the watched tree. For example |
There shouldn't be any changes in the watched files, both the Handlebars compilation in the HTML and the Babel JS transpiling should happen runtime. I went through my setup and debug output several times and couldn't see anything out of place, so I think the bug must be on Nodemon (or dependency) side. My feeling is that the problem might be due to the virtualised filesystem within Docker, but I didn't have time to dig deep enough to debug that, being unfamiliar with library code. |
Can you add the There is some logic that attempts to work out your docker clock offset - since it doesn't match the timestamp on the files (I suspect the clock is in the past, so the change timestamp is in the future). |
Sorry, I just saw you did. Can you try another thing - though I don't know what the fix is:
|
#625 closes and released in |
I'm trying to get Nodemon (with Gulp-Nodemon) working with the official Docker Node 0.12 image, but after having spent hours on this there's literally nothing else I can try :(
When I change any file, the restart process just gets into a loop and tries to restart on every second.
Setting a delay doesn't seem to help, other than completely preventing restart. Btw it seems when passing the
delay
option via the Gulp-Nodemon config object it's treating the number as milliseconds instead of seconds, not sure why.Actually, could this loop happen because of using
babel-node
? The watch is aimed at the raw source file though.Here's the full, minimal repo with the problem present: https://github.com/ustwo/docker-node-boilerplate
The relevant bit in my Gulpfile:
Dump:
Loop without delay:
Loop with delay:
The text was updated successfully, but these errors were encountered: