-
Notifications
You must be signed in to change notification settings - Fork 12k
"ng serve" live development does not detect file changes #8168
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
Comments
The failure becomes more strange. I was working with old ng version 1.2.6 up to now (because it does not cover the problem), and suddenly the same problem occurs with this old version. Nothing installed or changed on packages in the meantime. I switch back to the newest ng version 1.4.9, and surprise, it works. Yesterday it does not work... Is there any information how this LIVE mechanism works? Maybe some file time stamps which cause this problem? |
I'm not aware of this problem existing currently. There's a long standing issue where reloads can fail to occur with a lot of possible causes (#1610), have you checked if that's your case? Either way if you think it's related to a version update, can you setup a minimal repro please? You can read here why this is needed. A good way to make a minimal repro is to create a new app via |
@filipesilva, Thank you for response. I have checked #1610, but I did not find any suspect file names in my project. The project has a lot of files, and the failure behaviour changes from time to time which makes it hard to determine the root cause. At the moment (v 1.4.9) I see that change on most of files are detected proper, but then suddenly, changes on one html file is not detected. When I restart |
@ManfredSteiner could it be due to #8022 ? |
@steveschmitt, No, there are no errors on typescript files. I have also observed that behavior in the past sometimes. In that case I stop |
@filipesilva, I have the problem again with newest version v1.4.9. No file changes are detected (I try several files). Now I have checked #1610 and did increase fs.inotify.max_user_watches (I am working on Ubuntu 16.04 system) with:
After restarting |
Facing the same issue with Angular CLI 1.4.9 on Windows 10. More details below. Is switching back to 1.2.6 as @ManfredSteiner helpfully pointed out the only current solution? Something else I observed... If i run ng serve without ng build, the "dist" directory in my app vanishes, then the app throws an error as a required file is located in there. So to test the app, I'm currently doing ng build & ng serve & nodemon server.js (every time I want to see changes). @angular/cli: 1.4.9 Thanks! |
I am seeing this sometimes as well. It usually happens when I change a model file. I was hitting #8022 as well, but sometimes the watch stops even w/o a TypeScript error. |
In my case only one component was having this problem, not detecting its code changes, rest of the app was ok. I solved it by generating a new component, copy-pasted all codes from the previous into new, deleted the old one and renamed the new after the old component. Now it's up and running but prior to this, I've tried to figure it out with the help of all the posts on the net, but couldn't. Don't have a clue what went wrong. |
I solved this issue from this link. https://stackoverflow.com/questions/48092880/ng-serve-not-detecting-file-changes-automatically I needed to use The problem happened after I upgraded to ng cli 1.6.3 and package manager to yarn. also and |
Angular CLI: 1.5.0 Using |
I have the same problem on Windows, so far it only seems to affect one file. I need to stop ng serve and start it again to get it to pick up the changes once, after that it is ignored again. Angular CLI: 1.6.3 Since I'm on Windows sudo is not going to help me |
Same here : |
for people who use Windows |
This worked for me on ubuntu 16.04 |
I know this may sound weird, but I solved it by stop using vscode workspaces, I was using it and serving the angular application using the integrated terminal, when I opened up only my project folder, it worked again. |
The problem was related with Inotify Watches Limit on Linux. I increased the watches limit to 512K. sudo sysctl fs.inotify.max_user_watches=524288 |
I'm running across the same issue with a relatively small app. Upping max inotify user watches fixed it for me as well. The odd thing is, running
|
I solve the same problem using: Angular CLI: 1.6.1 angular/cdk: 5.2.5 |
Hi i also run into this problem. package.json:
i tried to use global node installation and |
This issue looks like the exact same as #1610. That other one contains a lot more information on this topic so I'm closing in favor of it. |
Yes, even I tried it without VsCode in my Linux machine, it actually works, this is due watchers limit in VSCode as explained in this link - https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
Output from:
ng --version
.Repro steps.
Newest ng version 1.4.9 does not detect file changes. When switching back to recent version (1.2.6), everything works as desired.
Recent version:
The log given by the failure.
Desired functionality.
rebundling if file changes
Mention any other details that might be useful.
ng version 1.4.9 prints the following warning (but appplication itself is working without problems)
Using this version can result in undefined behaviour and difficult to debug problems.
The text was updated successfully, but these errors were encountered: