为什么凉亭不使用我的bower.json分辨率?

时间:2017-06-19 08:11:47

标签: angularjs bower

我有一个项目,我需要使用angularjs 1.2。我有一个bower.json文件,其中包含以下内容:

{
  "name": "myproject",
  "dependencies": {
    "angular": "1.2.32"
  },
  "resolutions": {
    "angular": "1.2.32"
  }
}

当我安装angular时,它会问我想要哪个版本,但如果我理解正确,它应该不会。当我尝试安装另一个像angular-route这样的项目时,它会再次询问,甚至安装错误的项目:

bower install angular-route
bower angular-route#*           cached https://github.com/angular/bower-angular-route.git#1.6.4
bower angular-route#*         validate 1.6.4 against https://github.com/angular/bower-angular-route.git#*
bower angular#1.6.4             cached https://github.com/angular/bower-angular.git#1.6.4
bower angular#1.6.4           validate 1.6.4 against https://github.com/angular/bower-angular.git#1.6.4

Unable to find a suitable version for angular, please choose one by typing one of the numbers below:
    1) angular#1.2.32 which resolved to 1.2.32 and is required by angamcharts2
    2) angular#1.6.4 which resolved to 1.6.4 and is required by angular-route#1.6.4

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

? Answer !1
bower angular               resolution Saved angular#1.2.32 as resolution
bower angular-route#^1.6.4     install angular-route#1.6.4

angular-route#1.6.4 bower_components/angular-route
└── angular#1.2.32

我知道有角度路线1.2.32但是我不想用正确的版本手动安装我的所有包裹。为什么“决议”不起作用?

0 个答案:

没有答案