npm run ionic:build --prod giving strange error

后端 未结 3 827
生来不讨喜
生来不讨喜 2021-01-20 12:10

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

3条回答
  •  滥情空心
    2021-01-20 12:41

    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

提交回复
热议问题