Error with ionic cordova build android --prod


#1

ionic cordova build android --prod


How to enable Production mode?
#2

i have tried above one that time .i am getting errror


#3


#4

Instead of posting screenshots, would you be so kind to copy the text over next time? Easier to read for us and screen readers. Regarding your problem, this error tells me you’re probably you have some plain javascript code that doesn’t work with the AOT compiler. That’s what’s causing the error.


#5

how to resolve this any idea about this error


#6

No, because I’m missing out on my magical class to look in someones other project today :slight_smile: Do you by chance run non typescript code in your project?


#7

i am using ionic-audio plugin in my code


#8
  1. Does your project work in ionic serve?
  2. Does the build succeed if you use npm run build --prod?
  3. Please post your ionic info output. Thank you.

#9

in ionic serve my app working fine
ionic cordova run android --prod this throwing error as i attached image above post


#10

here my ionic info


#11

I know, you posted that. That’s why I asked for npm run build --prod which is similar but different.


#12

3 posts were split to a new topic: Error: Type X in *.ts is part of the declarations of 2 modules