Unable to find suitable version for angular - install bower

I installed the Angular app, so when it clicked on Heroku, it launches bower install . However, I am getting errors due to versioning issues.

When I run bower install locally, the following seems to me:

 Unable to find a suitable version for angular, please choose one: 1) angular#1.2.16 which resolved to 1.2.16 and is required by angular-resource#1.2.16 2) angular#1.2.23 which resolved to 1.2.23 and is required by angular-cookies#1.2.23 3) angular#>= 1.0.8 which resolved to 1.2.25 and is required by angular-ui-router#0.2.10 4) angular#^1 which resolved to 1.2.25 and is required by angular-ui-codemirror#0.1.6 5) angular#~1.2.2 which resolved to 1.2.25 and is required by splitter#f5c2195050 6) angular#>=1.0.6 which resolved to 1.2.25 and is required by angular-elastic#2.4.0 7) angular#~1.2 which resolved to 1.2.25 and is required by angular-nanoscroller#0.2.1 8) angular#~1.2.9 which resolved to 1.2.25 and is required by angular-sockjs#0.0.1Prefix the choice with ! to persist it to bower.json ? Answer:: 

What should I do with this - I really need version 1.3 from Angular due to the debounce function

My bower.json looks like this:

 { "name": "myapp", "version": "0.0.1", "dependencies": { "json3": "~3.3.1", "es5-shim": "~3.1.0", "angular-resource": "1.2.16", "angular-sanitize": "1.2.16", "angular-animate": "1.2.16", "angular-ui-router": "~0.2.10", "jquery": "~2.1.1", "angular-ui-codemirror": "~0.1.6", "splitter": "*", "angular-cookies": "~1.2.23", "angular-elastic": "~2.4.0", "angular-local-storage": "~0.0.7", "chance": "~0.5.6", "nanoscroller": "~0.8.4", "angular-nanoscroller": "~0.2.1", "angular-sockjs": "~0.0.1" } } 
+47
angularjs bower heroku
Sep 18 '14 at 14:40
source share
5 answers

Update your current angular dependencies to 1.3.x and add permission for angular to suppress the prompt:

 { "name": "myapp", "version": "0.0.1", "dependencies": { "angular": "~1.3.x", "angular-animate": "~1.3.x", "angular-cookies": "~1.3.x", "angular-resource": "~1.3.x", "angular-sanitize": "~1.3.x", "angular-ui-router": "~0.2.10", "angular-ui-codemirror": "~0.1.6", "angular-elastic": "~2.4.0", "angular-local-storage": "~0.0.7", "angular-nanoscroller": "~0.2.1", "angular-sockjs": ">=0.0.1", "json3": "~3.3.1", "es5-shim": "~3.1.0", "jquery": "~2.1.1", "splitter": "*", "chance": "~0.5.6", "nanoscroller": "~0.8.4" }, "resolutions": { "angular": "~1.3.x" } } 
+69
Sep 18 '14 at 2:59
source share

A very good explanation and resolution of the problem can be found here:

bower-resolutions

Just copy a few lines here for reference:

When you specify dependencies for your application through Bower, some of the packages may rely on different versions of the same library. You will need to decide which version of libraries you really need. In other words, you break the tie. But you do not want to break it every time, so keep your choice.

When you run the bower installation, the resolution process is interactive. When bower recognizes that there are two packages that depend on the package in different versions, it will list all these versions and ask:

enter image description here

The next line in the tooltip is very convenient. It reads:

enter image description here

Awesome! So, if I type! 2 instead, my selection is saved in bower.json. In particular, he will add a permission entry:

enter image description here

Now, the next time you run the bower installation, there is no interactive question about which version I want, because Ive already decided that for ember there should be version 1.5.1 for my application.

+17
06 Oct '15 at 6:34
source share

You should update bower (it works for me):

 bower update 
+8
Apr 04 '16 at 19:24
source share

Delete the / bower_components directory and run bower install again.

Hacking, but it still works .. !!

+2
Aug 11 '16 at 12:08 on
source share

You can run the installation command, and when it prompts you to select a version, use (!) An exclamation point as a prefix for the option. For example, 3 for the third option. Then it will be added to the bower.json file of your application and will resolve the conflict.

Hope this helps.

+1
Dec 13 '16 at 14:24
source share



All Articles