Ionic version: (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[x] 3.x
[ ] 4.x
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
Angular 5.* build --prod fail.
Current behavior:
There is a project on Ionic 3, Angular 5.*
When I'm trying to ionic cordova build --prod --release android I have error
Error: Please update @angular/cli. Angular 5+ requires at least Angular CLI 1.5+
at throwNotSupportedError
But if I'm run ionic cordova build --release android I got
BUILD SUCCESSFUL
Total time: 1 mins 29.379 secs
Built the following apk(s):
Expected behavior:
Correctly build --prod mode.
Steps to reproduce:
Create Ionic project with Angular 5+, in project root run
ionic cordova build --prod --release android
Related code:
"dependencies": {
"@angular/common": "5.1.1",
"@angular/compiler": "5.1.1",
"@angular/compiler-cli": "5.1.1",
"@angular/core": "5.1.1",
"@angular/forms": "5.1.1",
"@angular/http": "5.1.1",
"@angular/platform-browser": "5.1.1",
"@angular/platform-browser-dynamic": "5.1.1",
...
},
"devDependencies": {
"@angular/tsc-wrapped": "4.4.6",
"@ionic/app-scripts": "^2.1.4",
"ionic": "3.19.0",
"typescript": "2.6.2"
}
Other information:
Ionic info:
cli packages: (/Users/***/Projects/***/node_modules)
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.3.0 ios 4.5.2
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.2
Node : v8.8.1
npm : 5.5.1
OS : macOS High Sierra
Xcode : Xcode 9.1 Build version 9B55
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
Hello! Thank you for opening an issue with us!
You are on an older version of @ionic/app-scripts. According to the upgrade instructions in our changelog you should have gone to 3.1.0 when you upgraded the Ionic Framework to 3.9.0 (you are currently on 3.9.2 (the latest)).
There have been a handful of bug-fix releases since then, so really you should be on 3.1.5 of @ionic/app-scripts now. Give that a try and let me know if the problem persists.
Thank you for using Ionic
It's work! Thanks
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Most helpful comment
Hello! Thank you for opening an issue with us!
You are on an older version of
@ionic/app-scripts. According to the upgrade instructions in our changelog you should have gone to3.1.0when you upgraded the Ionic Framework to3.9.0(you are currently on3.9.2(the latest)).There have been a handful of bug-fix releases since then, so really you should be on
3.1.5of@ionic/app-scriptsnow. Give that a try and let me know if the problem persists.Thank you for using Ionic