Bower 安装 AngularJS 失败

Bower install AngularJS failing

我们项目中使用bower来下载前端相关的脚本。该项目托管在 Heroku 上。 bower install 是构建脚本的一部分。直到昨天,一切都运行良好。突然,bower 无法安装 AngularJS.

这是我的 bower.json

{
  "name": "laravel.app",
  "version": "0.0.1",
  "dependencies": {
    "jquery": "3.2.0",
    "angular": "1.6.4",
    "bootstrap": "3.3.7",
    "angular-ui-router": "^0.4.2",
    "angular-sanitize": "1.6.4",
    "angular-route": "1.6.4",
    "angular-toastr": "^2.1.1",
    "components-font-awesome": "^4.7.0",
    "angular-google-picker": "^0.2.2",
    "foundation-datepicker": "^1.5.6",
    "chart.js": "^2.7.0",
    "ng-lodash": "^0.5.0",
    "moment": "^2.18.1"
  }
}

构建时的错误是

bower angular#~1.4 cached https://github.com/angular/bower-angular.git#1.4.14 bower angular#~1.4 validate 1.4.14 against https://github.com/angular/bower-angular.git#~1.4 bower ECONFLICT Unable to find suitable version for angular

这也破坏了 Heroku 中新提交的构建。为什么会这样?昨天之前一切都很好。

错误的核心是这个

ECONFLICT Unable to find suitable version for angular

当您通过 Bower 为您的应用程序指定依赖项时,某些包可能依赖于同一库的不同版本。

bower install angular#latest --save -F