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
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.
i solve my problem. in my project i was using an outdated module, ion-datepicker
if you are also using same issue, here are some steps, you can follow and find your infected or outdated module.
Step one:
in your project find in all files from 'ionic-angular/
word,
Step Two:
if you find this word like import { xyz } from 'ionic-angular/xyz/abc'
update that module.
if no update available then you can remove that module
npm uninstall ion-datepicker(or your defected module)
after this you needs to remove that module from app.module.ts and where ever you are using remove from there, after that you can try
you have some module added in your project but you have used it. check the app.Module, see if you have imported all the modules which is in your project.