0

When I have installed angularJS 1.2.16 and some other angular modules also version 1.2.16 and I want to update my angularJS 1.2.16 to 1.2.23 will this work?

If yes why do I get such questions: That the angularJS version is not correct for angular mocks or ui-router?

Or do I not correctly interpret that?

C:\test>bower install angular#1.2.23 --save
bower angular#>= 1.0.8          cached git://github.com/angular/bower-angular.git#1.2.23
bower angular#>= 1.0.8        validate 1.2.23 against git://github.com/angular/bower-angular.git#>= 1.0.8
bower angular#1.2.16            cached git://github.com/angular/bower-angular.git#1.2.16
bower angular#1.2.16          validate 1.2.16 against git://github.com/angular/bower-angular.git#1.2.16
bower angular#1.2.23            cached git://github.com/angular/bower-angular.git#1.2.23
bower angular#1.2.23          validate 1.2.23 against git://github.com/angular/bower-angular.git#1.2.23

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-mocks#1.2.16
    2) angular#>= 1.0.8 which resolved to 1.2.23 and is required by angular-ui-router#0.2.10
    3) angular#1.2.23 which resolved to 1.2.23

Prefix the choice with ! to persist it to bower.json


[?] Answer:

UPDATE

{
  "name": "test",
  "version": "0.0.0",
  "dependencies": {
    "angular-ui-router": "~0.2.10",
    "angular": "1.2.23",
    "jquery": "~2.1.1",
    "bootstrap": "~3.2.0"
  },
  "devDependencies": {
    "angular-mocks": "1.2.16",
    "angular-scenario": "1.2.16"
  },
  "appPath": "app",
  "resolutions": {
    "angular": "1.2.23"
1
  • Please show your bower.json Commented Aug 23, 2014 at 20:02

1 Answer 1

1
  1. Yes, angular and ng modules need to have the same version. It might work if their are not but you have no guarantee and it could be a source of weird bugs.

  2. You probably have an entry in your bower.json requesting angular-mocks#1.2.16 which depends on angularjs 1.2.16. Please post your bower.json to confirm

You can update your bower.json:

"angular-mocks": "1.2.23",
"angular-scenario": "1.2.23"
Sign up to request clarification or add additional context in comments.

5 Comments

1) But there never existed a 1.2.16 version of angular ui-router ust 0.2.10, how could I then ever use this with angular 1.2.16 ? My bower.json is above!
ui-router is not an official 'angular' module. It is part of the 'angular ui' project. Therefore their versions can mismatch. The proof of that is ui-router requires a version of angular higher than 1.0.8 and this is resolved by 1.2.23 angular#>= 1.0.8.
So when I have a not official angular module I should have a look the the bower.json of the module and check the dependencies property?
in my opinion, it is not required unless you are encountering version conflicts.
OK thanks I have updated now to --latest version for all 1.2.16 packages :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.