鲍尔没有更新或安装

时间:2015-03-31 08:01:24

标签: bower

我一直在尝试使用Bower更新moment.js(以及其他一些插件),将时刻从2.8.4更新为2.9。

我将bower.json文件更改为"moment": "2.x"(约为2.8.3,我也尝试了~2.8,然后是2.x)& bower说它已经过缓存和验证,但仍然安装了bower list节目2.8.4。

每当我尝试更新或安装时,它都会遍历所有依赖项。

然后我卸载时刻(有效),但现在bower不会安装它,bower listmoment not installed

我正在运行最新的Bower 1.4.0。

我的bower.json:

{
  "name": "intranet",
  "version": "1.12.35",
  "authors": [
    "SteB"
  ],
  "license": "proprietary",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
  ],
  "dependencies": {
    "jquery": "~2.1",
    "jquery-migrate": "~1.2",
    "modernizr": "~2.8.3",
    "moment": "2.x",
    "respond": "~1.4.2",
    "jquery-ui": "~1.11",
    "chartjs": "~1.0.2",
    "rickshaw": "~1.5.1",
    "gmaps": "~0.4.14",
    "d3": "~3.4.11",
    "bootstrap-modal": "~2.2.5",
    "kbwood_countdown": "~2.0.1",
    "bootstrap": "2.3.2",
    "footable": "2.0.1.5",
    "bootstrap-maxlength": "~1.5.7",
    "flot": "~0.8.3",
    "jqplot": "*",
    "scrollup": "2.4.*",
    "fullcalendar": "1.6.4",
    "bootstrap-switch": "~2.0.5",
    "es5-shim": "~4.1",
    "chosen": "~1.2",
    "platform": "~1.3",
    "fontawesome": "~4.2.0",
    "jquery.steps": "~1.1",
    "jquery-cookie": "~1.4",
    "typeahead.js": "~0.10.5",
    "ladda": "~0.9.7"
  },
  "devDependencies": {},
  "resolutions": {
    "bootstrap": "2.3.2",
    "jquery": "~2.1"
  }
}

1 个答案:

答案 0 :(得分:1)

  1. 删除以前的“bower_components”文件夹或“.bowerrc”中指定的任何其他目标安装位置
  2. 使用以下bower.json(null获取最新版本)
  3. 运行“bower install”

    {
     "name": "intranet",
      "version": "1.12.35",
      "authors": [
                  "SteB"
                 ],
      "ignore": [
                 "**/.*",
                 "node_modules",
                 "bower_components",
                 "test",
                 "tests"
                ],
       "license": "proprietary",
       "dependencies" : {
                         "jquery": null,
                         "jquery-migrate": null,
                         "modernizr": null,
                         "moment": null,
                         "respond": null,
                         "jquery-ui": null
                       }
     }
    
  4. 以上会很好。你需要检查你对bower bcz的休息依赖性,那里的命名似乎是不正确的