Getting error when building apk with --prod

Hey all,

When I run app with command

ionic cordova run android --device

I don’t have any runtime issue.

But when I use --prod flag, as in

ionic cordova run android --prod --device

build is successful, but when I run app, I get following error :

ERROR Error: No provider for t!
    at E (main.js:1)
    at x (main.js:1)
    at t._throwOrNull (main.js:3)
    at t._getByKeyDefault (main.js:3)
    at t._getByKey (main.js:3)
    at t.get (main.js:3)
    at e.get [as _SettingsProvider_57] (main.js:30)
    at e.get [as _SetupCore_66] (main.js:30)
    at e.get [as _AuthService_67] (main.js:30)
    at e.getInternal (main.js:30)

Since in main.js, code is minified, I am not able to find what is causing problem. Can you guys suggest something?

You could try seeing if the problem persists using --aot instead of --prod, and if so, you should have more information that way.

thanks @rapropos! was able to debug and resolve my problem.