Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECONFLICT Unable to find suitable version for angular #866

Closed
zajca opened this issue Sep 11, 2013 · 30 comments
Closed

ECONFLICT Unable to find suitable version for angular #866

zajca opened this issue Sep 11, 2013 · 30 comments
Milestone

Comments

@zajca
Copy link

zajca commented Sep 11, 2013

Hi,
I have strange problem with bower.
On my PC I run bower install and on my server with same version of bower 1.2.6 I'm getting

bower angular#*                         validate 1.0.8 against git://github.com/angular/bower-angular.git#*
bower                                  ECONFLICT Unable to find suitable version for angular

I don't know what could cause this
This is how my bower.json looks like.

{
  "name": "project",
  "version": "0.0.1",
  "devDependencies": {
    "angular": "~1.2.0-rc.2",
    "angular-mocks": "~1.2.0-rc.2",
    "bootstrap": "~2.3.2",
    "angular-bootstrap": "~0.5.0",
    "angular-ui-router": "~0.0.1",
    "angular-ui-utils": "~0.0.4",
    "angular-sanitize": "~1.2.0-rc.2",
    "angular-resource": "~1.2.0-rc.2",
    "angularytics":"0.2.2",
      "json2":"*",
    "underscore":"1.5.1",
    "restangular":"1.1.3",
    "tinymce": "git://github.com/jozzhart/tinymce.git#4.0.0"
  },
  "dependencies": {}
}
@robfletcher
Copy link

I get exactly the same thing. On my local machine it offered me a menu to choose the option to resolve against – even though one of the options had exactly the same version string as the one I'd asked it to install. The problem is on our continuous integration server there's no way to make that selection so committing the updated bower.json to source control breaks our build.

@satazor
Copy link
Member

satazor commented Sep 18, 2013

Those questions only appear when running in an interactive shell. Be sure to persist your choices to the bower.json by prefixing the choice with !.

Subsequent installs will obey the choice you made previously.

@satazor
Copy link
Member

satazor commented Sep 19, 2013

Please let me know if persisting the resolutions solved the problem so I can close this out.

@robfletcher
Copy link

I don't know how to get the resolution to persist now I've already chosen an option. I deleted all the Bower dependencies and ~/.bower but I'm not being asked again.

It's also not clear why there's a conflict in the first place. I haven't asked for an ambiguous version of Angular and all the dependencies in my bower.json file depend on the exact same version so why is the conflict there?

@pgayvallet
Copy link

Same problem there. Breaking our build on integration server, and no way to force the version. Everything working on local machine... any way around ?

@satazor
Copy link
Member

satazor commented Sep 23, 2013

I can't replicate. I've tried the json file above on an non-interactive shell and works. Can you guys give me a way to replicate?

@pgayvallet
Copy link

My conflicting json was the following :

"dependencies": {
    "underscore":"*",
    "momentjs":"~2.2.1",
    "bootstrap": "~3.0.0",
    "jquery": "~1.9.1",
    "jquery.cookie": "*",
    "jquery-ui": "~1.10.3",
    "jquery-file-upload": "*",
    "angular": "=1.2.0-rc.2",
    "angular-route": "=1.2.0-rc.2",
    "angular-resource": "=1.2.0-rc.2",
    "angular-animate": "=1.2.0-rc.2",
    "angular-cookies": "=1.2.0-rc.2",
    "angular-i18n": "=1.2.0-rc.2",
    "angular-bootstrap" : "*",
    "ng-grid": "*",
    "highcharts": "*",
    "highcharts-ng": "*"
},

"devDependencies": {
    "angular-mocks": "=1.2.0-rc.2",
    "angular-scenario": "=1.2.0-rc.2"
}

and the result in an interactive shell :

Unable to find a suitable version for angular, please choose one:
1) angular#1.0.8 which resolved to 1.0.8 and has angular-scenario#1.2.0-rc.2 as dependants
2) angular#1.2.0-rc.2 which resolved to 1.2.0-rc.2 and has angular-animate#1.2.0-rc.2, angular-cookies#1.2.0-rc.2, angular-mocks#1.2.0-rc.2, angular-resource#1.2.0-rc.2, angular-route#1.2.0-rc.2, angular-scenario#1.2.0-rc.2 as dependants
3) angular#~1.2.0-rc.2 which resolved to 1.2.0-rc.2 and has tael-web as dependants
4) angular#>=1 which resolved to 1.2.0-rc.2 and has angular-bootstrap#0.6.0 as dependants
5) angular#>=1.0.4 which resolved to 1.2.0-rc.2 and has highcharts-ng#0.0.2 as dependants 

But this is very strange because bower seems to think angular-scenario 1.2.0-rc.2 depends on angular 1.0.8.. which is totally false ( just check to repository )...

Is there any caching of any kind when resolving / updating dependencies ?

@satazor
Copy link
Member

satazor commented Sep 28, 2013

@wayofspark no conflict was produced when installing the dependencies you listed:

bower angular-route#=1.2.0-rc.2          install angular-route#1.2.0-rc.2
bower angular-animate#=1.2.0-rc.2        install angular-animate#1.2.0-rc.2
bower angular-resource#=1.2.0-rc.2       install angular-resource#1.2.0-rc.2
bower angular-cookies#=1.2.0-rc.2        install angular-cookies#1.2.0-rc.2
bower jquery.cookie#*                    install jquery.cookie#1.3.1
bower jquery-file-upload#*               install jquery-file-upload#8.8.5
bower jquery#~1.9.1                      install jquery#1.9.1
bower angular-bootstrap#*                install angular-bootstrap#0.6.0
bower angular-i18n#=1.2.0-rc.2           install angular-i18n#1.2.0-rc.2
bower highcharts-ng#*                    install highcharts-ng#0.0.2
bower angular-mocks#=1.2.0-rc.2          install angular-mocks#1.2.0-rc.2
bower angular#=1.2.0-rc.2                install angular#1.2.0-rc.2
bower highcharts#*                       install highcharts#3.0.5
bower angular-scenario#=1.2.0-rc.2       install angular-scenario#1.2.0-rc.2
bower momentjs#~2.2.1                    install momentjs#2.2.1
bower underscore#*                       install underscore#1.5.2
bower ng-grid#*                          install ng-grid#2.0.7
bower blueimp-canvas-to-blob#>=2.0.7     install blueimp-canvas-to-blob#2.0.7
bower jquery-ui#~1.10.3                  install jquery-ui#1.10.3
bower blueimp-load-image#>=1.9.1         install blueimp-load-image#1.9.1
bower blueimp-tmpl#>=2.3.0               install blueimp-tmpl#2.4.0
bower bootstrap#~3.0.0                   install bootstrap#3.0.0

What version of bower are you guys using?

@tillda
Copy link

tillda commented Oct 12, 2013

I can confirm this bug. Both running bower install angular#1.2.0-rc.2 from console and having "angular": "1.2.0-rc.2", in dependencies and running bower install shows the question:

Unable to find a suitable version for angular, please choose one:
1) angular#~1.0 || ~1.1 which resolved to 1.0.8 and has angular-webstorage#0.9.3 as dependants
2) angular#=1.2.0-rc.2 which resolved to 1.2.0-rc.2 and has angular-client as dependants
3) angular#1.2.0-rc.2 which resolved to 1.2.0-rc.2 and has angular-mocks#1.2.0-rc.2 as dependants
4) angular#>=1 which resolved to 1.2.0-rc.2 and has angular-bootstrap#0.6.0 as dependants
5) angular#>= 1.0.6 which resolved to 1.2.0-rc.2 and has angular-ui-router#0.2.0 as dependants
6) angular#>= 1.0.2 which resolved to 1.2.0-rc.2 and has angular-ui-utils#0.0.4 as dependants

@eddiemonge
Copy link
Contributor

Working bower.json file:

{
  "name": "app",
  "version": "0.1.0",
  "dependencies": {
    "angular": "1.2.0-rc.2",
    "angular-animate": "~1.2.0-rc.2",
    "angular-bootstrap": "~0.6.0",
    "angular-resource": "1.2.0-rc.2",
    "angular-route": "1.2.0-rc.2",
    "angular-sanitize": "1.2.0-rc.2",
    "angular-translate": "~1.1.0",
    "es5-shim": ">=2.1.0",
    "html5shiv": ">=3.7.0",
    "json3": ">=3.2.5",
    "normalize-css": ">=2.1.3",
    "respond": "~1.3.0",
    "angular-loading-bar": "~0.0.4"
  },
  "devDependencies": {
    "angular-mocks": "1.2.0-rc.2",
    "angular-scenario": "1.2.0-rc.2"
  },
  "resolutions": {
    "angular": "1.2.0-rc.2"
  }
}

@eddiemonge
Copy link
Contributor

@robfletcher
Copy link

I tried to upgrade to Angular 1.0.2-rc.3 this morning and got the same problem again. I manually modified the version numbers in my bower.json file and it now contains this:

{
  "name": "myApp",
  "version": "0.0.0",
  "dependencies": {
    "jquery": "1.10.2",
    "json3": "~3.2.4",
    "es5-shim": "~2.0.8",
    "jsonlint": "https://github.com/zaach/jsonlint",
    "bootstrap": "~3.0.0",
    "momentjs": "~2.2.1",
    "angular": "~1.2.0-rc.3",
    "angular-route": "~1.2.0-rc.3",
    "angular-resource": "~1.2.0-rc.3",
    "angular-cookies": "~1.2.0-rc.3",
    "angular-sanitize": "~1.2.0-rc.3",
    "jquery.jqplot.1.0.8r1250.tar.gz": "https://bitbucket.org/cleonello/jqplot/downloads/jquery.jqplot.1.0.8r1250.tar.gz",
    "jquery-smartresize": "https://github.com/louisremi/jquery-smartresize.git"
  },
  "devDependencies": {
    "angular-mocks": "~1.2.0-rc.3",
    "angular-scenario": "~1.2.0-rc.3"
  }
}

I then ran bower install and got the following output:

Unable to find a suitable version for angular, please choose one:
    1) angular#1.2.0-rc.2 which resolved to 1.2.0-rc.2 and has angular-cookies#1.2.0-rc.3, angular-scenario#1.2.0-rc.3 as dependants
    2) angular#1.2.0-rc.3 which resolved to 1.2.0-rc.3 and has angular-mocks#1.2.0-rc.3, angular-resource#1.2.0-rc.3, angular-route#1.2.0-rc.3, angular-sanitize#1.2.0-rc.3, angular-scenario#1.2.0-rc.3 as dependants
    3) angular#~1.2.0-rc.3 which resolved to 1.2.0-rc.3 and has myApp as dependants

@wibblymat
Copy link
Member

@robfletcher You have a genuine version conflict here. The angular-cookies tag for rc.3 has an out of date bower.json that has a version of rc.2 and depends on exactly rc.2 of angular. All of the others have an exact dependency on rc.3.

Since the version cannot be exactly rc.2 and exactly rc.3 there is a conflict. angular-cookies needs to have an up to date bower.json.

@robfletcher
Copy link

@wibblymat ah, thanks. I selected option 2 and it added this to bower.json:

"resolutions": {
  "angular": "1.2.0-rc.3"
}

All seems good now.

@satazor satazor closed this as completed Oct 18, 2013
@ninjasort
Copy link

Is there a way to avoid this prompt completely?

@sheerun
Copy link
Contributor

sheerun commented Jun 23, 2014

Use --force-latest or add component version to resoltions key in bower.json

@ninjasort
Copy link

Okay, thanks.

@crisu83
Copy link

crisu83 commented Jan 20, 2015

@satazor thanks for the tip about prefix choices with !. That solved my issue.

@59naga
Copy link

59naga commented Apr 7, 2015

+1

@megha-n-bodke
Copy link

Adding angular entry to "resolutions" in angular worked for me.
@robfletcher Thanks for sharing solution!

@abhi80y
Copy link

abhi80y commented Feb 15, 2016

It worked for me by making following changes in "bower.json":

"angular": "latest",
"angular-mocks": "latest",
"jquery": "latest",
"bootstrap": "latest"

there was a mismatch in the version updated and the version that I got from Git for "angular-phonecat"

@ykanzi
Copy link

ykanzi commented Mar 7, 2016

add --force like this

bower install angular-route --force

@watonyweng
Copy link

Thank you for your answer at @ykanzi

@ferakpeter
Copy link

I had the same issue with a different setup:
We have an Artifactory proxy that is accessing the public bower repository. So the chain goes like this: bower install -> bower-art-resolver -> artifactory -> bower public repo

The problem was the bower-art-resolver, after updating to the latest version the conflict was resolved.

@calcyu
Copy link

calcyu commented Aug 20, 2016

@ykanzi 3Q

@ghost
Copy link

ghost commented Jan 3, 2017

I solved this error message by using the same version for angular and angular-route

"dependencies": {
"bootstrap": "~3.3.5",
"font-awesome": "~4.4.0",
"angular": "~1.4.7",
"angular-route": "~1.4.7"
}

@abdouszn
Copy link

abdouszn commented Feb 7, 2017

i have some problem and i resolve it by adding :
"resolutions": {
"angular": "~1.2.0"
}

in bower.json file
with ~1.2.0 is my version of angular , so you need to replace this by your angular version

@AAdewunmi
Copy link

Hi,
I'm having problems with bower. Can't seem to find a solution.

1. Here is the error message:

$ bower install angular-route -S
bower invalid-meta The "name" is recommended to be lowercase, can contain digits, dots, dashes
bower angular-route#* cached https://github.com/angular/bower-angular-route.git#1.6.4
bower angular-route#* validate 1.6.4 against https://github.com/angular/bower-angular-route.git#*
bower angular#1.6.4 cached https://github.com/angular/bower-angular.git#1.6.4
bower angular#1.6.4 validate 1.6.4 against https://github.com/angular/bower-angular.git#1.6.4
bower ECONFLICT Unable to find suitable version for angular

2. Injected "resolutions" into my project bower.json file
"dependencies": {
"bootstrap": "~3.3.5",
"font-awesome": "~4.4.0",
"angular": "~1.4.7"
},

"resolutions": {
"angular": "~1.4.7"
}

3. Still getting the same error:
bower ECONFLICT Unable to find suitable version for angular

How can I resolve this problem?

Thanks

@gityoti
Copy link

gityoti commented Jul 8, 2018

don't use command tool of git, use cmd tool of PC.

git error = bower ECONFLICT Unable to find suitable version for xxx

@sonnysavage
Copy link

I had an issue like this due to running MinTTY on Windows 10 (Git Bash). This article explains why, and gives two different solutions: https://willi.am/blog/2016/08/08/docker-for-windows-interactive-sessions-in-mintty-git-bash/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests