I want to update my angular version from 1.4.9 to 1.5.6. While executing bower install angular#1.5.6 --save I am getting ECONFLICT Unable to find suitable version for angular.
Here is the trace:
$ bower install angular#1.5.6 --save
bower angular#1.5.6 cached https://github.com/angular/bower-angular.git#1.5.6
bower angular#1.5.6 validate 1.5.6 against https://github.com/angular/bower-angular.git#1.5.6
bower angular#1.4.8 cached https://github.com/angular/bower-angular.git#1.4.8
bower angular#1.4.8 validate 1.4.8 against https://github.com/angular/bower-angular.git#1.4.8
bower angular#>=1.3.0 cached https://github.com/angular/bower-angular.git#1.5.6
bower angular#>=1.3.0 validate 1.5.6 against https://github.com/angular/bower-angular.git#>=1.3.0
bower angular#1.4.10 cached https://github.com/angular/bower-angular.git#1.4.10
bower angular#1.4.10 validate 1.4.10 against https://github.com/angular/bower-angular.git#1.4.10
bower angular#1.5.5 cached https://github.com/angular/bower-angular.git#1.5.5
bower angular#1.5.5 validate 1.5.5 against https://github.com/angular/bower-angular.git#1.5.5
bower angular#>=1.2.26 <1.6 cached https://github.com/angular/bower-angular.git#1.5.6
bower angular#>=1.2.26 <1.6 validate 1.5.6 against https://github.com/angular/bower-angular.git#>=1.2.26 <1.6
bower angular#* cached https://github.com/angular/bower-angular.git#1.5.6
bower angular#* validate 1.5.6 against https://github.com/angular/bower-angular.git#*
bower angular#^1.3.0 || >1.4.0-beta.0 cached https://github.com/angular/bower-angular.git#1.5.6
bower angular#^1.3.0 || >1.4.0-beta.0 validate 1.5.6 against https://github.com/angular/bower-angular.git#^1.3.0 || >1.4.0-beta.0
bower angular#~1.x cached https://github.com/angular/bower-angular.git#1.5.6
bower angular#~1.x validate 1.5.6 against https://github.com/angular/bower-angular.git#~1.x
bower angular#~1.3.13 cached https://github.com/angular/bower-angular.git#1.3.20
bower angular#~1.3.13 validate 1.3.20 against https://github.com/angular/bower-angular.git#~1.3.13
bower angular#>1.2.0 cached https://github.com/angular/bower-angular.git#1.5.6
bower angular#>1.2.0 validate 1.5.6 against https://github.com/angular/bower-angular.git#>1.2.0
bower angular#>=1.3.x cached https://github.com/angular/bower-angular.git#1.5.6
bower angular#>=1.3.x validate 1.5.6 against https://github.com/angular/bower-angular.git#>=1.3.x
bower ECONFLICT Unable to find suitable version for angular
my bower file is:
{
"name": "myAppName",
"version": "0.0.0",
"dependencies": {
"angular": "1.4.9",
"angular-animate": "~1.4.9",
"angular-bootstrap": " 0.13.4",
"angular-cookies": "1.4.8",
"angular-datatables": "~0.5.1",
"angular-filter": "~0.5.8",
"angular-material": "~0.11.4",
"angular-resource": "^1.4.9",
"angular-route": "^1.4.8",
"angular-sanitize": "^1.4.9",
"angular-touch": "^1.4.9",
"angular-translate": "^2.9.0",
"angular-translate-loader-static-files": "~2.8.1",
"angular-ui-date": "~0.0.11",
"bootstrap": "^3.2.0",
"components-font-awesome": "^4.4.0",
"datatables": "~1.10.10",
"jquery": "^2.1.4",
"md-chips": "~0.2.4",
"ngprogress": "^1.1.2",
"textAngular": "~1.4.6",
"underscore": "^1.8.3",
"moment": "^2.13.0"
},
"devDependencies": {
"angular-mocks": "^1.4.9",
"textAngular": "~1.4.6",
"md-chips": "~0.2.4"
},
"appPath": "app",
"moduleName": "myModuleName",
"resolutions": {
"angular-sanitize": "^1.4.9",
"angular": "1.4.9",
"angular-translate": "^2.9.0"
},
"overrides": {
"jquery": {
"main": "dist/jquery.js"
},
"md-chips": "~0.2.4"
}
}
Referring to the picture, there are 6 packages to update which we will update to the version we are upgrading to (in this case it is v9) using ng update command: (you can define specific versions of the packages by going to npm packages, for example - @angular/[email protected] as 9.1.2 is the latest stable release of @angular/core package for angular9).
To update the local CLI in your Angular project follow this steps: Starting from CLI v6 you can just run ng update in order to get your dependencies updated automatically to a new version. With ng update sometimes you might want to add --force flag. You can also pass --all flag to upgrade all packages at the same time.
Angular material update: It gives errors in some versions of angular material when running update scripts because of the update scripts do not run smoothly in some versions. What I did is updating material after getting everything done. So when I finish with all other updates, I just ran ng update @angular/material.
You can force Angular to update all the dependencies by using --all & --force flag 1 2 3
bower install angular#latest --save -F
-F = --force-latest: Force latest version on conflict
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With