Issue
I'm facing following issue: If I try to build my Ionic 3 app for ios with the --prod
flag, I get following error:
typescript error
Cannot determine the module for class OverlayPortal in
C:/.../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
C:/.../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
C:/.../node_modules/ionic-angular/umd/components/app/click-block.d.ts!
Add ClickBlock to the NgModule to fix it.
Build command used:
ionic cordova build ios --prod
The error does not appear if I build without the --prod
flag or if I use ionic serve
. I'm not using any of the classes mentioned in the error message in my code.
Solution
I resolved the issue by searching through my code and removing any reference to Ionics Page
class, which is suggested here.
Example: Turn let page : Page;
into let page;
Also make sure to remove any imports of the Page
class, which might look like this:
import { Page } from 'ionic-angular/umd/navigation/nav-util';
Answered By - Phonolog
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.