The same problem. Removed 3.5.0, reinstalled 3.4.0 and will be show the same error in the browser for ionic framework 3.5.0. Npm shows 3.4.0 version on my laptop.
This happen when you are running multiple “ionic serve” in the same machine.
Maybe you forgot to stop some of these commands.
In windows, I recommend running as Admin: “taskkill -f -im node*” without the quotes. This will stop every node process (ionic serve / ionic emulate for example).
This keeps happening to me too. It goes away when I re-execute ionic serve. Its an annoying bug because at first I thought it was buggy code (still might be?) but since a lot of different people are getting the same error, it might be something else. I dont mind using ionic serve to restart the page, but once I build my app and deploy an apk, will the bug still randomly show up?
I’m having the same issue here, and I have found no ways to solve this.
Every time I make changes to my code the dev server just gets the error and stop working.
Why do we have a dev server at all if it won’t work.
This should have priority in the pipeline for ionic.
Issues like these make people waste serious time and money with debugging code that should just work when the stack is the culprit.
I had the same issue on my PWA and solved it by the order we are calling / caching the vendor.js. vendor.js has to be called first before main.js on the index.html and in the same way we have to cache it on the service worker first before caching main.js. If main.js started referring the vendor.js before it loads we might get the above error.
In my case I don’t have a service worker caching assets but as @brug360 said I was executing 2 applications with ionic serve by the project demand, so I’m having to slow down my development switching instances instead of working on both code bases as usual.
One more finding from my side for this problem is CDN cache… we are using CDN for serving static assets and since ionic app consists of html, js and css our CDN cached some older version of our app (ex) main.js its referring 37.js and this 37.js was cached at the CDN end with some older version. Finally we purged the file at the CDN end and we got rid of this issue… Try that out and update me
I dont know if this helps anybody at all, but I got this problem and it was as simple as the fact I had generated a page with a number as the first character in the name, once I deleted this then all was perfect
Hi, I have the same issue in Ionic 3 PWA.
The error happened when i do some action(click or navigate) after app was served
It happened once in a while, not everytime.
I have also deployed the app in firebase host.
This error will sometime show when i open the app.
I suspect this is problem of the service worker.
I have try @manoemerson, but its not work, the error remain, below is my service worker