Live reload not updating code changing correctly

Sometimes, when I change and save a layout, component, page or class, the version of the application showing in the browser is an older version that the one showning a minute ago.

Sometimes I need to save other file related to the file failing or need to restart ionic server so that I get the most recent version of the page.

Sometimes it just don’t get updated during so much time that it is making my work impossible.

I tried to reinstall Visual Studio Code, Ionic CLI, NodeJS and NPM but it don’t solved the problem. The version of NodeJS don’t affects it.

To me, the error appears just after I start the live reload server and still appears after I restart the server.

Sometimes it shows a version of code modified days ago.

Months ago it was not a so frequent problem…

The problem don’t happens only form me. Here where I work, other people are facing the same problem in projects created from the ground.

I’m not sure about that, but it’s like if Ionic Projects keeps cache of older versions of the code and, sometimes, loses itself to show the correct version.

How can I get Ionic App update at every change?

@Natanael4354 Where do you change your code?

Do you mean the IDE? I use Visual Studio Code.

Same problem here. Specially when I only modify template files (.html).

@Natanael4354

I told never update your code inside /www folder, change on app/src.

:+1:

Yes, I always change it in src folder. :unamused:

I’m surprised not many people are reporting this issue. I have the same issue at home and on my work machine. Anyone else?

Hi, @Natanael4354 @philmorley

in your cmd/terminal which kind of error can you add here

thanks

It doesn’t have errors directly related to this live reload problem. It will show errors related to older versions of the app, if there’s such errors, but nothing related to the not updating problem.

I tried to reinstall Visual Studio Code and Ionic CLI, but it don’t solved the problem.

Yes, this happens to me consistently. Not right away … usually after about an hour long dev session I will notice it starts happening.

As mentioned before, In order to get the latest version of files I have to ‘fake modify’ a related file.

No errors are reported.

To me, the error appears just after I start the live reload server and still appears after I restart the server.

Sometimes it shows a version of code modified days ago.

Months ago it was not a so frequent problem…

Hey, guys! What is the version of Node.js and NPM you are using?

I am using Node v6.11.2 and NPM 3.10.8.

1 Like

Same problem here… Live reload goes back to previous version of the code

I’m getting this constantly too. Very frustrating as you have to keep saving files in the hope everything will sync. Slowing down development times considerably!

Yes, this still happens to me all the time … i’m spending at least half my dev time trying to get ‘ionic serve’ to sync correctly.

This is happening to us as well. Multiple developers, multiple machines. We generally have to save an HTML template file, then go back, touch it, and save it again to get it to update in the ionic serve development web server. Viewing in Chrome 66.0.3359.117. Developing in VS Code x64 1.22.2 on Window 10.

This just started happening some time recently. It could have something to do with how Chrome is caching files… I haven’t tried in Firefox/Edge/IE yet.

This problem also happens in Firefox, Edge and IE.

I having the same problem, the app no refresh when I do a change in my code… a bad experience in the development process, any fix??

I have the same issue, on an angular project…

Sou novata no Ionic e em programação estou com o mesmo problema, mas dentro do visual estúdio code eu aperto f5 e ele atualiza sem precisar salvar
mas se alguém conseguir resolver esse problema me avise por favor!
pois isso atrapalha no nosso desempenho e interrompe as nosso raciocínio