Bower安装分辨率不遵循bower.json配置

时间:2016-06-07 17:37:08

标签: javascript angularjs bower

enter image description here

图像真的说明了一切 - 我正在尝试安装特定版本的angular-bootstrap。我跑的时候:

bower install angular-bootstrap#0.13.0 --save

它提示我提供解决方案答案,我已经提供了! persist-changes属性。我的bower.json更新了解决方案,我可以通过在命令行中手动回答此提示来手动安装正确的库,但它应该提示我,因为有指定的解决方案。我错过了什么?

最终目标是让bower install安装正确的版本而不提示。

修改:整个bower.json文件。只有更改是项目名称:

{
  "name": "fooBar",
  "version": "0.0.1",
  "dependencies": {
    "angular": "~1.3.x",
    "angular-animate": "1.3.x",
    "angular-bootstrap": "0.13.0",
    "angular-bootstrap-duallistbox": "~0.0.3",
    "angular-bootstrap-select": "~0.0.3",
    "angular-bootstrap-switch": "x.x.x",
    "angular-cookies": "1.3.x",
    "angular-dynamic-locale": "~0.1.27",
    "angular-flot": "~0.0.13",
    "angular-google-analytics": "x.x.x",
    "angular-gridster": "~0.10.7",
    "angular-i18n": "~1.3.x",
    "angular-intro.js": "~1.1.4",
    "angular-loading-bar": "x.x.x",
    "angular-local-storage": "x.x.x",
    "angular-messages": "~1.3.13",
    "angular-moment": "~0.8.2",
    "angular-ngautocomplete": "~1.0.0",
    "angular-peity": "~0.0.2",
    "angular-resource": "1.3.x",
    "angular-route": "1.3.x",
    "angular-sanitize": "~1.3.2",
    "angular-signalr-hub": "~1.3.x",
    "angular-translate": "~2.4.0",
    "angular-translate-loader-static-files": "~2.4.0",
    "angular-translate-loader-url": "~2.4.0",
    "angular-ui-router": "x.x.x",
    "angular-ui-select": "x.x.x",
    "angular-ui-sortable": "0.12.8",
    "angular-validator": "~0.2.5",
    "angular-wizard": "~0.4.0",
    "angular-xeditable": "~0.1.8",
    "angularD3": "~0.0.28",
    "angularjs-geolocation": "~0.1.1",
    "angularjs-nvd3-directives": "~0.0.7",
    "angularjs-toaster": "~0.4.9",
    "a0-angular-storage": "~0.0.9",
    "angular-jwt": "~0.0.6",
    "bootstrap": "x.x.x",
    "bootstrap-sass": "~3.3.3",
    "bootstrap-select": "~1.6.2",
    "bootstrap-social": "~4.8.0",
    "Chart.js": "~1.0.2",
    "d3": "~3.5.3",
    "flag-icon-css": "~0.6.4",
    "flow.js": "~2",
    "font-awesome": "~4.2.0",
    "jquery": "~2.1.4",
    "jquery-ui": "1.11.1",
    "jspdf": "~1.0.178",
    "lodash": "3.7.0",
    "moment": "x.x.x",
    "ng-clip": "~0.2.2",
    "ng-flow": "~2",
    "ngDraggable": "*",
    "ngImgCrop": "~0.3.2",
    "ngmap": "x.x.x",
    "nvd3": "~1.1.15-beta",
    "PACE": "pace#~1.0.2",
    "rangy-official": "~1.3.0-alpha.20140921",
    "restangular": "x.x.x",
    "signalr": "~2.1.2",
    "stacktrace-js": "~0.6.2",
    "textAngular": "x.x.x",
    "zeroclipboard": "x.x.x",
    "tc-angular-chartjs": "~1.0.12",
    "angular-sweetalert": "latest",
    "angular-touch": "^1.3.13",
    "auth0.js": "6.8.3",
    "auth0-lock": "9.1.4",
    "auth0-angular": "~4.0.1"
  },
  "devDependencies": {
    "angular-mocks": "x.x.x",
    "angular-scenario": "x.x.x",
    "angular-qtip2-directive": "~0.1.2"
  },
  "overrides": {
    "angular": {
      "dependencies": {
        "jquery": "~2.14"
      }
    },
    "bootstrap": {
      "main": []
    },
    "ngImgCrop": {
      "main": []
    },
    "textAngular": {
      "main": []
    },
    "angular-wizard": {
      "main": [
        "./dist/angular-wizard.css",
        "./dist/angular-wizard.js"
      ]
    },
    "flag-icon-css": {
      "main": [
        "css/flag-icon.min.css",
        "flags/1x1/us.svg",
        "flags/4x3/us.svg",
        "flags/1x1/ru.svg",
        "flags/4x3/ru.svg"
      ]
    },
    "angular-i18n": {
      "main": [
        "angular-locale_en-us.js"
      ]
    }
  },
  "resolutions": {
    "jquery": "x.x.x",
    "angular": "~1.3.x",
    "bootstrap-select": "~1.6.2",
    "d3": "~3.5.3",
    "angular-bootstrap": "0.13.0",
    "angular-ui-sortable": "~0.12.8",
    "lodash": "3.7.0"
  }
}

1 个答案:

答案 0 :(得分:1)

好吧,如果你提供了!,你应该在你的bower.json中看到这样的东西:

"resolutions": {
   "angular-bootstrap": "0.13.0"
}

你可以尝试添加它,看看它是否仍然要求解决。如果是,请删除bower_components文件夹并运行新的bower安装。