Error while building --prod Version ionic 3


#1

hi,
I am trying to build my ionic project for android only for now . when i run

ionic cordova build --release android

it builds successfully. But when i use --prod flag for production build it is throwing error

Error: Cannot determine the module for class OverlayPortal in D:/capacitor_ionic/ionic/node_modules/ionic-angular/umd/components/app/overlay-portal.d.ts! Add OverlayPortal to the NgModule to fix it.
Cannot determine the module for class IonicApp in D:/capacitor_ionic/ionic/node_modules/ionic-angular/umd/components/app/app-root.d.ts! Add IonicApp to the NgModule to fix it.
Cannot determine the module for class ClickBlock in D:/capacitor_ionic/ionic/node_modules/ionic-angular/umd/components/app/click-block.d.ts! Add ClickBlock to the NgModule to fix it.
Cannot determine the module for class Slides in D:/capacitor_ionic/ionic/node_modules/ionic-angular/umd/components/slides/slides.d.ts! Add Slides to the NgModule to fix it.

i dont know how to fix it . so if anyone knows then it would be a great help


#2

I think the problem was also discussed here!


#3

When use ionic cordova build android --prod im face this below errorrs

HOW TO SOLVE THIS ISSUE PLEASE HELP ME

[19:34:46] ionic-app-script task: “build”
[19:34:46] Error: The Angular AoT build failed. See the issues above
Error: The Angular AoT build failed. See the issues above
at /Users/karuppasamy/sites/product_mobile/inncommops_mobile/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:237:55
at step (/Users/karuppasamy/sites/product_mobile/inncommops_mobile/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:32:23)
at Object.next (/Users/karuppasamy/sites/product_mobile/inncommops_mobile/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:13:53)
at fulfilled (/Users/karuppasamy/sites/product_mobile/inncommops_mobile/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:4:58)
at
[ERROR] An error occurred while running subprocess ionic-app-scripts.