【问题标题】:What is wrong with this bower.json?这个 bower.json 有什么问题?
【发布时间】:2017-04-01 11:29:30
【问题描述】:

我正在使用以下 bower.json:

{
  "name": "angularSeedApp",
  "version": "0.0.0",
  "dependencies": {
    "angular-material": "~1.1.0",
    "angular-animate": "1.5.9",
    "angular-aria": "1.5.9",
    "angular-material-icons": "x",
    "material-design-icons": "x",
    "angular-cookies": "~1.5.0",
    "angular-sanitize": "~1.5.0",
    "angular-resource": "~1.4.0",
    "angular-ui-router": "~0.3.1",
    "moment": "^2.17.0",
    "angular": "~1.5.0",
    "angular-filter": "x",
    "fontawesome": "~4.3.0",
    "hello": "^1.14.0",
    "cloudinary_ng": "^1.0.0",
    "moment-timezone": "^0.5.10",
    "angular-timezone-selector": "^1.6.0",
    "moment-range": "^2.1.0",
    "underscore": "^1.8.3"
  },
  "devDependencies": {
    "angular-mocks": "~1.5.0"
  },
  "resolutions": {
    "angular": "~1.5.0",
    "lodash": "4.0.1",
    "moment": ">= 1",
    "moment-timezone": "^0.5.10"
  }
}

我的问题如下 -> 我的一个朋友在这个项目上工作了很长时间 - 所有文件都是从 src 文件夹而不是 dist 文件夹提供的。现在,当我构建项目时,不再检测到所有库 - 因此从 dist 提供服务会产生典型的角度错误“未找到模块”。

我觉得跟 bower_components 有关系的原因: 当我拉出项目时, bower_components 没有更新 - 所以它起作用了。更新 bower_components 后,它向我显示了这些错误。所以我相信它与凉亭库有关。

我们正在使用这个基本设置:https://github.com/PauloLuan/angular-gulp-seed

谁能告诉我这个 bower.json 有什么问题? 您能否也给我一些提示如何处理这些错误?

【问题讨论】:

    标签: javascript angularjs json bower


    【解决方案1】:

    解决方案基本上是对所有 angular-(resources) 使用固定版本。

      {
      "name": "angularSeedApp",
      "version": "0.0.0",
      "dependencies": {
        "jquery": "^3.2.1",
        "angular-material": "1.1.3",
        "angular-animate": "1.5.9",
        "angular-aria": "1.5.9",
        "angular-material-icons": "x",
        "material-design-icons": "x",
        "angular-cookies": "1.5.9",
        "angular-sanitize": "1.5.9",
        "angular-resource": "1.5.9",
        "angular-messages": "1.5.9",
        "angular-ui-router": "~0.3.1",
        "moment": "^2.17.0",
        "angular-filter": "x",
        "fontawesome": "~4.3.0",
        "hello": "^1.14.0",
        "cloudinary_ng": "^1.0.0",
        "moment-timezone": "^0.5.10",
        "angular-timezone-selector": "^1.6.0",
        "moment-range": "^2.1.0",
        "underscore": "^1.8.3",
        "angular": "1.5.9"
      },
      "devDependencies": {
        "angular-mocks": "1.5.9"
      },
      "resolutions": {
        "moment": ">= 2.6.0",
        "angular": "1.5.9",
        "moment-timezone": "^0.5.10",
        "lodash": "4.0.1"
      }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-26
      • 2021-08-20
      • 2015-09-23
      • 2021-02-27
      • 2012-03-10
      • 2010-11-01
      • 2011-08-26
      • 2020-04-16
      相关资源
      最近更新 更多