-
Notifications
You must be signed in to change notification settings - Fork 76
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
Endlessly restart #94
Comments
We're getting similar behaviour. Works fine with one element in the (By specifying a function for the |
installing |
Right, I'm about to push a PR to temporarily fix this by just modifying the gulp-nodemon package.json file to reference nodemon <=1.7.1... There's a downstream change from the chokidar module that's causing a lot more 'add' events to be published, and the timing seems to be out of whack with the 'ready' events they publish, so that when passing an array of file watches, it alerts 'ready' for completion if each segment of files... When nodemon receives the first 'ready' event, it then calls its filterAndRestart function everytime a new 'add' event comes in, which is every single file read in by chokidar after that first 'ready' event gets alerted, which causes it to constantly recycle the process as it adds more and more files to its watch. Oddly enough, running nodemon by itself doesn't seem to cause this problem when a file is saved, so it seems to be something related to how gulp-nodemon is passing the file list to nodemon (maybe?). In any case, running vanilla nodemon, I don't get the magic of running additional gulp tasks when certain file types change, so this change to restrict the nodemon version to prior to them bumping up their chokidar version to 1.2.0 seems to fix it for now. |
This issue was caused a bug in a There are trade-offs for the gulp-nodemon project. If the version dependency continues to be managed loosely, there will continue be issues opened here if nodemon breaks something again. On the other hand, if the version is managed tightly, periodic releases of gulp-nodemon will be needed to "keep up", otherwise different issues will be opened asking for |
Another approach is to keep the acceptable range of the
|
@markstos pushed the latest with nodemon 1.8.1, but considering using your blacklist. The problem is that if someone happens to have nodemon 1.7.x installed, then Node will pick it up? If that's not the case, then such a blacklist probably isn't necessary, but I'm not exactly sure how the |
Thanks, @JacksonGariety. Where I can find out how I could use a blacklist? Perhaps you are referring to the ability to specify ranges of allowed or excluded versions in package.json dependency lists. As I understand, I depend on gulp-nodemon and don't have control over the version of Regarding how caret versions work, they are documented in the semver package. |
@markstos my thinking was that you'd fork gulp-nodemon and edit it to use the blacklist. Then put that fork in your package.json as specified here: https://docs.npmjs.com/files/package.json#git-urls-as-dependencies If that blacklist works we'll merge it in with master so other people don't accidentally end up with the nodemon 1.7.x bug. |
I see. I don't plan to fork the project, as I've solved the issue for myself. You might still want to update your version syntax to to exclude the problematic versions as I previously recommended to avoid the possibility of more support requests landing here.
|
Hello,
When I specify watching array, in config object, with more one element,
nodemon
is restarting endlessly:Result in console log:
If I put only one element in this array, works fine:
Result in console log:
My
node
version isv4.2.1
and worked fine before.Thanks for your help.
The text was updated successfully, but these errors were encountered: