格式错误的bower.json文件

时间:2013-10-22 21:29:08

标签: json bower

我安装了最新版本的Bower。我正在尝试命令

bower register flatly-3 https://github.com/brandonjschwartz/bower-bootswatch-flatly.git

Bower有错误消息,指出bower.json文件由于意外字符串而格式错误。我已经尝试了许多不同的东西(标点符号等),但得到了相同的错误...非常感谢任何帮助

1 个答案:

答案 0 :(得分:0)

Bower试图从您的回购中获取标记3.0.0:

https://github.com/brandonjschwartz/bower-bootswatch-flatly/releases/tag/3.0.0

该版本的bower.json确实存在一些问题:

{
  "name": "bower-bootswatch-flatly",
  "version": "2.3.2",
  "main": "less/flatly.less",
  "keywords": [
    "flatly",
    "bootstrap",
    "twitter bootstrap",
    "bootswatch",
    "less",
    "css",
    "flat",
    "flat ui",
    "theme"
  ] <-- missing comma
  "ignore": [
    "**/.*",
    "node_modules",
    "components"
  ],
  "dependencies": {
    "bootstrap-less": "2.3.2"
  }
}

您最好的选择是重做标签