Inconsistency in compiling ionic - ts code not updated to js, and not updated in the webpack


#1

I am using ionic 3, (exact versions bellow)
I am having huge issues with compile / builds consistency:

  1. run ionic serve
  2. change line of code in a .ts file, the browser gets refresh indication, but js files not updated / or created if i delete the js.
  3. after js files updated - it does happen from time to time, it is not reflected in the running app while i am still under the ionic serve, just when i stop the ionic serve, and run it again. it catches the changes.

I was working with ionic 1 and 2, and never face such issues, and it start happening about 1-1.5 month ago,
clearly, while using ionic serve, you have expectations that the code changes will reflected as soon as the browser finish to reload, the inconsistency in it, is a development nightmare.

do u have similar issue with it ? any tips to overcome this frustration ?

@ionic/cli-utils : 1.13.0
ionic (Ionic CLI) : 3.13.0
cordova (Cordova CLI) : 7.0.1
@ionic/app-scripts : 3.0.0
Cordova Platforms : ios 4.4.0
Ionic Framework : ionic-angular 3.6.1
ios-deploy : 1.9.2
Node : v8.2.1
npm : 5.4.2
OS : macOS Sierra
Xcode : Xcode 9.0 Build version 9A235


#2

I also get those inconsistencies.

To solve it, I make sure not to save any changes before the previous ones are actually effective.
For example, if I update a .ts file and then directly update another .ts files before ionic serve had time to fully reload the browser => the second changes are not effective.

That’s not really a solution, but that may help you overcome a bit of frustration.

Other than this scenario, I do not get any inconsistencies.


#3

Well, i dont see it as real solution, have consistence build is crucial.
it is very normal case to require multiple changes.


#4

I totally agree. But i don’t think there is any workaround for this. Maybe the best is to open an issue on the ionic-cli repo as it clearly requires a fix.


#5

I found something that may help you. It seemed to work for me.
Not tested much though, but for now I don’t have problems anymore.

Go to Google Chrome dev tools => Application => Clear Storage => Clear site data


#6

maybe a hint to the source of the problem, no-matter what changes i have made to a service file named: message.service.ts it hasn’t compiled a .js file.
Just after making a random change, to a component file, message.component.ts (which includes the message.service.ts file), it triggered compiling of the message.service.ts file, and created message.service.js file


#7

I am facing the same problem. Started working on a ionic 3 app today and the changes are not consistent…

For example:

  1. I change the .ts file and hit save.
  2. Make some other changes and hit save.
  3. It throws up an error that was solved while saving 1.

#8

This issue become so annoying for the development effort, that i even willing to pay for IONIC to get a professional answer for why is this happening, and how to solve it in a solid way, that will enable us to count on ionic compilation.

sadly, they havn’t get back to my contact request nor my email, for a week.
anyone have a way to get their attention to support their product - even by getting money for it ?

i cant figure out how this isn’t a critical issue for them to resolve, and response.


#9

Any updates? Did you get a response?


#10

TLDR; Lack of support for symbolic link

no, havn’t got help for it, but i did find the source of the problem (in my case), i have tried to have a shared code between angular app, and ionic app.
Creating a symbolic link under the ionic src folder, assuming it will handle it as regular code.
(sadly) duplicating the directory files, and maintain the code changes manually between the projects solve the compilation inconsistency.