Angular 模拟安装询问我依赖项
Angular Mocks install ask me for dependencies
我真的不知道该回答什么...我是 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:
angular-mock
需要 angular
,但 angular
不在您的项目中。它与 ionic
库捆绑在一起。这意味着您需要版本 1.3.13 -> 选择 #1
请在bower.json
中添加此代码
"resolutions": {
"angular": "1.2.0-rc.2"
}
我真的不知道该回答什么...我是 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:
angular-mock
需要 angular
,但 angular
不在您的项目中。它与 ionic
库捆绑在一起。这意味着您需要版本 1.3.13 -> 选择 #1
请在bower.json
中添加此代码"resolutions": {
"angular": "1.2.0-rc.2"
}