When I am trying to run npm run ionic:build --prod
, it is giving me below errors:
Error: Cannot determine the module for class OverlayPor
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.
1. Step one:
In your project find in all files
from 'ionic-angular/
word,
2. 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
ionic cordova build android --prod --release