Strange angular version resolving bug with bower install

前端 未结 3 988
感情败类
感情败类 2020-12-16 11:26

I\'m trying to update my angular version, and I think bower went just mad.

My deps :

    \"dependencies\": {
    \"underscore\":\"*\",
    \"momentj         


        
相关标签:
3条回答
  • 2020-12-16 12:06

    Instead of:

    "angular": "~1.2.0-rc.2"

    Try:

    "angular": "=1.2.0-rc.2"

    Might not be the right way to do it however but it solved a similar issue in my project.

    0 讨论(0)
  • 2020-12-16 12:11

    Try adding this section to your bower.json:

    "dependencies": {
      ...
    },
    "resolutions":{
      "angular": "1.2.0-rc.2"
    }
    

    Note: angular version in resolutions as same as version in dependencies.

    0 讨论(0)
  • 2020-12-16 12:23

    I got the same problem with the latest bower version.

    You can just do as the bower output prompts: Prefix the choice with ! to persist it to bower.json to choose one from the options provided. Then your bower.json will be updated with an additional "resolutions": { ... } block then the problem will be solved.

    0 讨论(0)
提交回复
热议问题