-
-
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
Restarts for non watched files #1320
Comments
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
Dummy reply to keep this active |
I am seeing this issue too.
I am only specifically watching 2 directories and 1 file in the root of the project directory but nodemon is watching the entire project directory still. This only occurs when I add the file; watching 2 directories is working as expected. After some digging, I found the code is specifically removing the file part. The comment suggests it is because of Windows but on OSX this causes the project directory to be watched. I agree that #1259 and #1260 are the cause and specifically 1cda8fa. Reverting to |
Similar (perhaps identical) behavior started occurring recently for me, as well. This is new behavior (started within the past couple of weeks). Issues
To clarify, EnvironmentWSL (Ubuntu) on Windows 10 Pro 64bit
{
"verbose": true,
"ignore": [
".idea/*",
"migrations/*",
"fixtures/*"
]
} Dump
|
@kurtmilam can you share the output of |
@remy I added the dump info to my original comment ^^ Thanks for taking a look! |
Same is happening for me. Nodemon triggers restarts arbitrarily on files that have not changed and seems not to respect --ignore from command line. Same setup used to work fine and it started a week ago, around the same time Windows and WSL update was released (running Version 10.0.17134 Build 17134). |
I am having a similar issue, with restarts triggering by unchanged files. I could narrow down the problem by running a
|
Having similar issue recently: #1354 Tried to revert to 1.11., seems working yet, but who knows, can't find the regularity of the issue. |
Reverting to earlier versions doesn't help. |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
There are instructions on how to reproduce this in my earlier comment. I am seeing too many files being watched on the latest version (1.17.5) |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
Still seems to be an issue |
Win 10 64bit still not fixed.. its anoying |
I'm not a regular windows user, so if you're finding this issue annoying, I'd strongly encourage you to help via a pull request that either fixes, or helps others to debug. |
Kindly look at the above comment from @baileyandy #1320 (comment) @hadikcz @remy The above line of code effectively says that if the path you are watching is a file, use that file's directory to start watching. (Note: The variable names there say that they are dealing with directories, but they might actually be dealing with files) I hit this bug when I was trying to watch a file at the project's root and nodemon rather started watching the full project root itself. |
I have looked at that comment, and I also know that the line was added to fix another bug. That line does indeed to tell chokidar to watch the directory, but the actual triggering isn't dealt with in that code, it fires a change and then it filters through the But I'd love it if I actually had a PR that gave me a test and the fix (because if I reverse that change, it'll cause a regression). |
This is great!! Thanks for the quickfix! |
Thanks for fixing this. 1.18.0 is behaving exactly as expected! 👍 |
@remy Thanks for the fix :-) |
nodemon -v
: 1.17.3node -v
: 8.9.4nodemon index.js --inspect --exec babel-node
nodemon.json
Expected behaviour
Nodemon should not restart if the files being watched have not changed
Actual behaviour
Nodemon restarts arbitrarily
Steps to reproduce
I'm using hot reload to watch/reload for client side file changes (which are other files in
src
folder) and nodemon to restart the process when only those files listed in the config changes.This worked fine in 1.15.0.
However, starting few days back, I started seeing same errors as #1259 (been using this setup without issues for last 6 months). I saw the fix and decided to upgrade. Now with current version, nodemon is restarting more often. #1260 seems like a suspect but I'm not sure.
You can use create-react-app along with the provided nodemon.json to reproduce this. Doesn't happen consistently but happens frequently enough.
If applicable, please append the
--dump
flag on your command and include the output here ensuring to remove any sensitive/personal details or tokens.The text was updated successfully, but these errors were encountered: