Live reload not updating code changing correctly


#1

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?


#2

@Natanael4354 Where do you change your code?


#3

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


#4

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


#5

@Natanael4354

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

:+1:


#6

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


#7

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


#8

Hi, @Natanael4354 @philmorley

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

thanks


#9

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.


#10

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.


#11

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…


#12

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.


#13

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


#14

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!


#15

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.


#16

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.


#17

This problem also happens in Firefox, Edge and IE.