真诚地我不知道该回答什么...我是Ionic + Angular的新手......我正在尝试安装Angular Mocks但它说的是Angular版本。
$ sudo bower install angular-mocks --allow-root
bower angular-mocks#* cached git://github.com/angular/bower-angular-mocks.git#1.4.1
bower angular-mocks#* validate 1.4.1 against git://github.com/angular/bower-angular-mocks.git#*
bower angular#1.4.1 cached git://github.com/angular/bower-angular.git#1.4.1
bower angular#1.4.1 validate 1.4.1 against git://github.com/angular/bower-angular.git#1.4.1
bower angular#^1 cached git://github.com/angular/bower-angular.git#1.4.1
bower angular#^1 validate 1.4.1 against git://github.com/angular/bower-angular.git#^1
bower angular#>= 1.0.8 cached git://github.com/angular/bower-angular.git#1.4.1
bower angular#>= 1.0.8 validate 1.4.1 against git://github.com/angular/bower-angular.git#>= 1.0.8
bower angular#>= 1.2.23 cached git://github.com/angular/bower-angular.git#1.4.1
bower angular#>= 1.2.23 validate 1.4.1 against git://github.com/angular/bower-angular.git#>= 1.2.23
bower angular#1.3.16 cached git://github.com/angular/bower-angular.git#1.3.16
bower angular#1.3.16 validate 1.3.16 against git://github.com/angular/bower-angular.git#1.3.16
bower angular#1.3.13 cached git://github.com/angular/bower-angular.git#1.3.13
bower angular#1.3.13 validate 1.3.13 against git://github.com/angular/bower-angular.git#1.3.13
Unable to find a suitable version for angular, please choose one:
1) angular#1.3.13 which resolved to 1.3.13 and is required by ionic#1.0.0
2) angular#1.3.16 which resolved to 1.3.16 and is required by angular-resource#1.3.16
3) angular#>=1.0.0 <1.5.0 which resolved to 1.4.0 and is required by angular-moment#0.9.2
4) angular#1.4.1 which resolved to 1.4.1 and is required by angular-mocks#1.4.1
5) angular#^1 which resolved to 1.4.1 and is required by angular-slugify#1.2.0
6) angular#>= 1.0.8 which resolved to 1.4.1 and is required by angular-ui-router#0.2.13
7) angular#>= 1.2.23 which resolved to 1.4.1 and is required by ngCordova#0.1.17-alpha
Prefix the choice with ! to persist it to bower.json
? Answer:
答案 0 :(得分:3)
angular-mock
需要angular
,但angular
不在您的项目中。它与ionic
库捆绑在一起。这意味着您需要版本1.3.13 - &gt;选择#1
答案 1 :(得分:0)
请在bower.json
中添加此代码"resolutions": {
"angular": "1.2.0-rc.2"
}