Hello there,
All of the sudden, I cant build anymore with:
ionic cordova build android --prod --release
The error I get is:
typescript error
Cannot determine the module for class OverlayPortal in
D:/Projects/ionic/leiderschapp/node_modules/ionic-angular/components/app/overlay-portal.d.ts! Add
OverlayPortal to the NgModule to fix it. Cannot determine the module for class IonicApp in
D:/Projects/ionic/leiderschapp/node_modules/ionic-angular/components/app/app-root.d.ts! Add IonicApp to the
NgModule to fix it. Cannot determine the module for class ClickBlock in
D:/Projects/ionic/leiderschapp/node_modules/ionic-angular/components/app/click-block.d.ts! Add ClickBlock to
the NgModule to fix it.
Error: The Angular AoT build failed. See the issues above
at D:\Projects\ionic\leiderschapp\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:237:55
at step (D:\Projects\ionic\leiderschapp\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:32:23)
at Object.next (D:\Projects\ionic\leiderschapp\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:13:53)
at fulfilled (D:\Projects\ionic\leiderschapp\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:4:58)
at <anonymous>
I have tried almost every SO and forum topic Google offered me, but without results :
Cannot determine the module for class IonicApp command: ionic cordova build <platform> --prod --release failure
angular - Error: Cannot determine the module for class OverlayPortal in --prod - Stack Overflow
ionic info:
cli packages: (C:\Users\duncan\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.10
Cordova Platforms : android 6.3.0 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Node : v8.10.0
npm : 6.1.0
OS : Windows 10
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
Edit #1:
I found out that the problem is in --prod. I can build perfectly fine with just --release.