angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng serve doesn't re-render files most of the time

Open mp-tbianchi opened this issue 9 years ago • 50 comments

OS?

Windows 10

Versions.

@angular/cli: 1.0.0-rc.0 node: 7.5.0 os: win32 x64 @angular/common: 2.4.8 @angular/compiler: 2.4.8 @angular/core: 2.4.8 @angular/forms: 2.4.8 @angular/http: 2.4.8 @angular/platform-browser: 2.4.8 @angular/platform-browser-dynamic: 2.4.8 @angular/router: 3.4.8 @angular/cli: 1.0.0-rc.0 @angular/compiler-cli: 2.4.8

Repro steps.

Happens all the time since update from beta version

Since I updated, ng serve doesn't rerender the file.
It sees the files that have changed and launches a recompilation but the changes don't get included.
It doesn't do this for a couple of recompilations then it refuses to update the files.

What kind of details can I give you?

Thanks

mp-tbianchi avatar Feb 28 '17 23:02 mp-tbianchi

Consolidating this thread with https://github.com/angular/angular-cli/issues/1610, it's roughly the same and better to keep discussion in a single place.

filipesilva avatar May 22 '17 11:05 filipesilva

@ovalol u are totally right

xiehongyang avatar May 27 '17 10:05 xiehongyang

The same behaviour here with 1.0.0. The changes are applied in 50% of cases. The browser gets updated, but the change of the .ts file is not there. Safe-write option in WebStorm enabled.

mejmo avatar Jun 01 '17 20:06 mejmo

@mejmo make Safe-write option in WebStorm disabled.

xiehongyang avatar Jun 02 '17 01:06 xiehongyang

It helped and solved the issue. Thank you.

mejmo avatar Jun 02 '17 06:06 mejmo

@filipesilva Instead of disabling safe-write is it possible to base watches off of actual file changes?

Clearly the mtime of a file will change, but if the contents are exactly the same should it really fire off a recompile?

If I have webstorm open, and I just click on the window, and then click on the browser window, it still recompiles, interrupting my workflow. Even if the file hasn't changed.

ghost avatar Oct 03 '17 21:10 ghost

What is the "safe-write" setting for SourceTree? For some reason whatever SourceTree does to refresh is causing a recompile. This seems kind of silly because some other alert could come along and force Windows to refresh it's GDM. It doesn't seem like "developing angular" should be interrupted by whichever OS you are using.

ghost avatar Oct 03 '17 21:10 ghost

Disabling safe-write didn't change anything for me. Still recompiles even though nothing has changed.

ghost avatar Oct 03 '17 21:10 ghost

I have the opposite of this problem, it reloads too often because webstorm changes file times behind my back and their is no way to ignore it with the cli https://github.com/angular/angular-cli/issues/8033#issuecomment-336305650

ghost avatar Oct 16 '17 14:10 ghost

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.