Ionic run android --prod Huge errors


I get an infinite errors with ionic run android --prod.

With ionic run android works perfectly…

I already made an ionic state reset and installed again the android platform.


What is your ionic info output?


I have the problem when run “#ionic android --prod” too.
I have issue that Loading and toast is not show at all. but when I run with “#ionic android --prod -lcs” and “#ionic run android” it was no problem. and wait it was fixed soon.


This is my ionic info.


First, PLEASE stop posting screenshots.

Second, your ionic-app-scripts version is pretty out of date. Try updating it to the latest version, currently 1.3.6.


Sorry about the screenshots.

I installed app scripts 1.3.6 and I’m getting the same errors :frowning:


There is a 1.3.7 now.

From the error messages and the fact that it only happens on --prod do you maybe have any strange imports in one of your files? Strange would be overly long paths, too many ../ or similar.


The problem is with the “page-name.component.ts” file that is created when you use the “ionic generate page” command.
Create your pages manually and run it (ionic run android --prod) or (ionic run android --prod) again.
it worked for me.
Home they fix it soon.


The please post the error as text so we can actually look at it. Include all the ionic info etc that shows which version you are using, too.


I already solved the problem, it was a weird import that I don’t know why it was there.