As we have been developing our ionic app it just seems like it has had longer load times on Android. Close to 20 seconds now to load. I’m not sure how to debug what is causing it to be slow.
I found this suggestions.
http://masteringionic.com/blog/2017-02-10-improving-ionic-app-launch-times/
But when I try that.
ionic cordova build android --prod
I get this error
[DEBUG] Reason for not using local CLI: LOCAL_CLI_NOT_FOUND
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: '/home/user/dev/Ionic-App/apps/app', local: false, binPath:
'/home/user/.npm-global/lib/node_modules/ionic/bin/ionic', libPath:
'/home/user/.npm-global/lib/node_modules/ionic/dist/index.js' }
Running app-scripts build: --prod --platform android --target cordova
[12:57:20] build prod started ...
[12:57:20] clean started ...
[12:57:20] clean finished in 1 ms
[12:57:20] copy started ...
[12:57:20] deeplinks started ...
[12:57:20] deeplinks finished in 78 ms
[12:57:20] ngc started ...
Error: Error encountered resolving symbol values statically. Calling function '?makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in /home/user/dev/Ionic-App/apps/node_modules/@angular/core/core.d.ts, resolving symbol ?e in/home/user/dev/Ionic-App/apps/node_modules/@angular/core/core.d.ts, resolving symbol ?e in /home/user/dev/Ionic-App/apps/node_modules/@angular/core/core.d.ts
at Error (native)
at syntaxError (/home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:1729:34)
at simplifyInContext (/home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:25118:23)
at StaticReflector.simplify (/home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:25130:13)
at StaticReflector.annotations (/home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:24558:41)
at NgModuleResolver.resolve (/home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:14896:70)
at CompileMetadataResolver.getNgModuleMetadata (/home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:15551:60)
at addNgModule (/home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:24408:58)
at /home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:24419:14
at Array.forEach (native)
[DEBUG] Error: Error encountered resolving symbol values statically. Calling function '?makeDecorator', function calls
are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving
symbol Injectable in /home/user/dev/Ionic-App/apps/node_modules/@angular/core/core.d.ts, resolving symbol ?e in
/home/user/dev/Ionic-App/apps/node_modules/@angular/core/core.d.ts, resolving symbol ?e in
/home/user/dev/Ionic-App/apps/node_modules/@angular/core/core.d.ts
at Error (native)
at syntaxError
(/home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:1729:34)
at simplifyInContext
(/home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:25118:23)
at StaticReflector.simplify
(/home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:25130:13)
at StaticReflector.annotations
(/home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:24558:41)
at NgModuleResolver.resolve
(/home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:14896:70)
at CompileMetadataResolver.getNgModuleMetadata
(/home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:15551:60)
at addNgModule
(/home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:24408:58)
at /home/user/dev/Ionic-App/apps/node_modules/@angular/compiler/bundles/compiler.umd.js:24419:14
at Array.forEach (native)
Is --prod still a valid command?