我正在尝试更新我的角度版本,而且我觉得凉鞋刚刚生气。
我的deps:
"dependencies": { "underscore":"*","momentjs":"~2.2.1","bootstrap": "~3.0.0","jquery": "~1.9.1","jquery.cookie": "*","jquery-ui": "~1.10.3","jquery-file-upload": "*","angular": "~1.2.0-rc.2","angular-route": "~1.2.0-rc.2","angular-resource": "~1.2.0-rc.2","angular-animate": "~1.2.0-rc.2","angular-cookies": "~1.2.0-rc.2","angular-i18n": "~1.2.0-rc.2","angular-bootstrap" : "*","ng-grid": "*","highcharts": "*","highcharts-ng": "*" },"devDependencies": { "angular-mocks": "~1.2.0-rc.2","angular-scenario": "~1.2.0-rc.2" }
这里重要的是:所有角度模块都是版本1.2.0-rc.2
但是做的时候
bower install
这是结果:
Unable to find a suitable version for angular,please choose one: 1) angular#1.0.8 which resolved to 1.0.8 and has angular-scenario#1.2.0-rc.2 as dependants 2) angular#1.2.0-rc.2 which resolved to 1.2.0-rc.2 and has angular-animate#1.2.0-rc.2,angular-cookies#1.2.0-rc.2,angular-mocks#1.2.0-rc.2,angular-resource#1.2.0-rc.2,angular-route#1.2.0-rc.2,angular-scenario#1.2.0-rc.2 as dependants 3) angular#~1.2.0-rc.2 which resolved to 1.2.0-rc.2 and has tael-web as dependants 4) angular#>=1 which resolved to 1.2.0-rc.2 and has angular-bootstrap#0.6.0 as dependants 5) angular#>=1.0.4 which resolved to 1.2.0-rc.2 and has highcharts-ng#0.0.2 as dependants
凉亭似乎认为角度场景1.2.0-rc2需要角度1.0.8 … ???
这实际上只是假:https://github.com/angular/bower-angular-scenario/tree/v1.2.0-rc.2
bower.json:
{ "name": "angular-scenario","version": "1.2.0-rc.2","main": "./angular-scenario.js","dependencies": { "angular": "1.2.0-rc.2" } }
我在这里失踪了我能做些什么来解决这个问题?要清楚:我不想使用交互式冲突解决方法,因为这是在远程配置项上。我只是想强调*假设角度场景1.2.0-rc2作为角度1.0.8作为依赖关系…
谢谢
尝试将此部分添加到您的bower.json中:
原文链接:https://www.f2er.com/angularjs/144704.html"dependencies": { ... },"resolutions":{ "angular": "1.2.0-rc.2" }
注意:分辨率中的角度版本与依赖关系中的版本相同。