简体   繁体   English

这个bower.json有什么问题?

[英]What is wrong with this bower.json?

I'm using following bower.json: 我正在使用以下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"
  }
}

My problem is following -> A friend of mine was working on the project for a long time - and all the files get served from the src folder instead of dist folder. 我的问题是->我的一个朋友从事该项目很长时间了-所有文件都是从src文件夹而不是dist文件夹提供的。 Now when I build the project all the libs get not detected anymore - so serving from dist produces the typical angular error "module not found". 现在,当我构建项目时,不再检测到所有库-因此从dist服务会产生典型的角度错误“找不到模块”。

The reason why I think it has to do with the bower_components: When I pulled the project the bower_components were not updated - so it worked. 我认为这与bower_components有关的原因:当我拉项目时,bower_components并未更新-因此可以正常工作。 After updating the bower_components it showed me these errors. 更新bower_components之后,它向我显示了这些错误。 So I believe it has to do with bower libs. 因此,我认为这与凉亭有关。

We are using this base setup: https://github.com/PauloLuan/angular-gulp-seed 我们正在使用以下基本设置: https : //github.com/PauloLuan/angular-gulp-seed

Can anyone tell me what is wrong with this bower.json? 谁能告诉我这个bower.json有什么问题吗? Can you also give me hints how to approach these kind of bugs? 您还可以给我提示如何解决此类错误吗?

The solution is basically to use fixed versions for all angular-(resources). 解决方案基本上是对所有angular-(资源)使用固定版本。

  {
  "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"
  }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM