Ionic prod build showing white screen after splash

We have developed an ionic 4 app. It works perfectly in debug mode. But when trying to serve with prod mode displays an Error: can not find @angular/core in inspect on chrome with a blank white screen

Command used: ionic serve --prod

maybe try ionic build --prod --verbose and inspect results?

Tom, first of all thanks for reply.when I inspected results its saying @angular/core module not found. While in debug mode it’s working find. How different can it be in prod mode?Also build command is successfully generating apk file

no clue, remove node_modules and rerun npm i?

Even though that may not make sense as in dev it is working…

Not sure how big your app is, but sometimes it can be some module declaration going wrong etc and that is difficult to find without rebuilding the code from whatever worked up to the point it does no longer

When I make AOT as false in angular.json and run in prod mode it works. If I enable AOT in debug mode also its running fine. But If I enable AOT in prod mode it builds but gives the runtime error saying @angular/core module not found

That is not very nice indeed

If all fails I normally try to recreate the app from start with a blank starter and assure, after each step in the transfer of code, the app runs and found the code part that hurts. Instead of trying to fix something broken and try to find the place.

Painstakingly…

Tom,
Do you how to resove this in ionic 4

ERROR in node_modules/ionic-angular/umd/components/picker/picker-component.d.ts.PickerCmp.html(13,71): : Expected 0 arguments, but got 1.

By looking at the mentioned line in the html code where u apparently forgot to include one argument in a function call