ionic 4 build with flag prod
See original GitHub issueBug Report
Ionic version:
[x] 4.10.3
Current behavior: My project use ion-tabs and some ionic-native. It build Ok untill I build with flag prod: ionic cordova build android --prod. I run in my android device and it log bug ERROR Error: StaticInjectorError[t -> o]: StaticInjectorError(Platform: core)[t -> o]: NullInjectorError: No provider for o!
Steps to reproduce: Create fresh ionic tabs project $ ionic start myApp tabs --type=angular
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.10.3 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.1.0
@angular-devkit/build-angular : 0.12.4
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.2.4
@ionic/angular-toolkit : 1.4.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4, resources
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 6 other plugins)
System:
Android SDK Tools : 26.1.1 (/home/user/sdk-tools-linux-4333796)
NodeJS : v8.10.0 (/usr/bin/node)
npm : 6.8.0
OS : Linux 4.15
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
What does --prod flag do exactly? - Ionic Forum
--prod flag minimizes and optimizes your entire project to a single file depending on type. It also ignores plugins/imports which you have ...
Read more >Ionic build: difference between --prod and --release flags?
Prod optimizes the code, Release makes it build in a different way so the app can be released to the stores. You have...
Read more >ionic 4 build with flag prod · Issue #17707 - GitHub
My project use ion-tabs and some ionic-native. It build Ok untill I build with flag prod: ionic cordova build android --prod.
Read more >Building an Ionic app using ConfigCat's Feature Flags
Having set our root page, we need to take care of the navigation for the other pages. This can be done using push...
Read more >Improving Ionic app launch times - Mastering Ionic
By default ALL Ionic application builds are now non-AoT (since ... After adding the —prod flag (notice that it's TWO hyphens NOT one?)...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@liamdebeasi, Thanks for your help, this issue has been resolved
Hi @phamconganh,
You need to add all of the Ionic Native plugins you use in your app to your
app.module.ts
file. This includes@ionic-native/network
,@ionic-native/geolocation
, and@ionic-native/diagnostic
.Can you add those and then verify whether or not you are still seeing this issue?
Thanks!