bower: ECONFLICT Unable to find suitable version for angular

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": {}
}

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Reactions: 4
  • Comments: 30 (8 by maintainers)

Commits related to this issue

Most upvoted comments

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

add --force like this

bower install angular-route --force

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.

@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.

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"
  }
}

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

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

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

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.

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

@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.