为什么不鲍尔更新升级角角我? [英] why doesn't bower update angular upgrade my angular?

查看:182
本文介绍了为什么不鲍尔更新升级角角我?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有角1.2.3,我想升级到1.2.7

 >猫bower.json
...
  依赖:{
    json3:〜3.2.4,
    jQuery的:〜1.9.1
    ES5-垫片:〜2.0.8
    toastr:〜2.0.1
    角-UI-TinyMCE的:最新
    强调:〜1.5.2
    underscore.string:〜2.3.3,
    角UI-utils的:〜0.0.4
    角的DragDrop:〜1.0.5,
    角曲奇:〜1.2.3
    角动画:〜1.2.3,
    角资源:〜1.2.3
    角度:〜1.2.3
  },
  devDependencies:{
    角嘲笑:〜1.2.3
    引导:〜3.0.1
    FONT-真棒:〜4.0.3
    角引导词缀:〜0.3.0
  }
...

我不知道下面的输出甚至意味着...,它是什么做的?

 >亭子更新角
凉亭角#〜1.x的缓存混帐://github.com/angular/bower-angular.git#1.2.7
凉亭角#〜1.x的验证1.2.7对混帐://github.com/angular/bower-angular.git#~1.x
凉亭角度#> = 1.0.2缓存的git://github.com/angular/bower-angular.git#1.2.7
凉亭角度#> = 1.0.2验证1.2.7对混帐://github.com/angular/bower-angular.git#> = 1.0.2
凉亭角#1.2.3缓存的git://github.com/angular/bower-angular.git#1.2.3
凉亭角#1.2.3对git的验证1.2.3://github.com/angular/bower-angular.git#1.2.3
凉亭角#〜1.2.3缓存的git://github.com/angular/bower-angular.git#1.2.7
凉亭角#〜1.2.3验证1.2.7对混帐://github.com/angular/bower-angular.git#~1.2.3
凉亭角#〜混帐为1.x的新版本://github.com/angular/bower-angular.git#~1.x
凉亭角#〜1.x的决心混帐://github.com/angular/bower-angular.git#~1.x
凉亭角度#>作为混帐= 1.0.2新版本://github.com/angular/bower-angular.git#> = 1.0.2
凉亭角度#> = 1.0.2决心混帐://github.com/angular/bower-angular.git#> = 1.0.2
凉亭角#〜混帐为1.2.3新版本://github.com/angular/bower-angular.git#~1.2.3
凉亭角#〜1.2.3决心混帐://github.com/angular/bower-angular.git#~1.2.3
凉亭角#〜1.x的下载https://github.com/angular/bower-angular/archive/v1.2.8-build.2095+sha.28fc80b.tar.gz
凉亭角度#> = 1.0.2下载https://github.com/angular/bower-angular/archive/v1.2.8-build.2095+sha.28fc80b.tar.gz
凉亭角#〜1.2.3下载https://github.com/angular/bower-angular/archive/v1.2.8-build.2095+sha.28fc80b.tar.gz
凉亭角度#> = 1.0.2提取archive.tar.gz
凉亭角度#> = 1.0.2解决混帐://github.com/angular/bower-angular.git#1.2.8-build.2095+sha.28fc80b
凉亭角#〜1.x中提取archive.tar.gz
凉亭角#〜1.x中解决的git://github.com/angular/bower-angular.git#1.2.8-build.2095+sha.28fc80b
凉亭角#〜1.2.3提取archive.tar.gz
凉亭角#〜1.2.3解决混帐://github.com/angular/bower-angular.git#1.2.8-build.2095+sha.28fc80b

没有什么变化?我仍然在1.2.3

 > git的差异
差异--git A / ngapp /应用/ bower_components /角/ .bower.json B / ngapp /应用/ bower_components /角/ .bower.json
指数dc9d0b6..842a1f3 100644
--- A / ngapp /应用/ bower_components /角/ .bower.json
+++ B / ngapp /应用/ bower_components /角/ .bower.json
@@ -11,6 +11,6 @@
     承诺:b112b099971f4cf016023bdeb00b267e9bf6dfb5
   },
   _source:混帐://github.com/angular/bower-angular.git
- _target:〜1.2.3,
+_target:1.2.3,
   _originalSource:角
 }>亭子--version
1.2.8

我缺少的东西吗?

 >亭子信息角
....显示所有版本,包括1.2.7和1.2.8,构建以及


解决方案

我觉得你的依赖是$ P $更新,从孤立的角度pventing你。例如,看看 bower_components /角路由/ bower.json 。您将看到列为依赖关系(1.2.3)角的特定版本,而不是一个 /相当接近说明(〜1.2.3 )。所以,你要更新只是棱角分明,但最远的凉亭可以把你的角度是当前的版本,因为你必须依赖于准确的版本,包等。

如果您亭子更新然后凉亭将有机会更新所有软件包,包括角路线和持有角背包等。这些包更新现在将允许凉亭,以同时满足相关性更新的角度。另外,我觉得,如果你确定所有这些依赖于特定的转角版本的软件包(你可以看到亭子列表依赖),并通过他们像参数凉亭更新角角角嘲笑资源角航线角的sanitize ... 然后鲍尔也可以进行更新。

I have angular 1.2.3 and I want to upgrade to 1.2.7

> cat bower.json
...
  "dependencies": {
    "json3": "~3.2.4",
    "jquery": "~1.9.1",
    "es5-shim": "~2.0.8",
    "toastr": "~2.0.1",
    "angular-ui-tinymce": "latest",
    "underscore": "~1.5.2",
    "underscore.string": "~2.3.3",
    "angular-ui-utils": "~0.0.4",
    "angular-dragdrop": "~1.0.5",
    "angular-cookies": "~1.2.3",
    "angular-animate": "~1.2.3",
    "angular-resource": "~1.2.3",
    "angular": "~1.2.3"
  },
  "devDependencies": {
    "angular-mocks": "~1.2.3",
    "bootstrap": "~3.0.1",
    "font-awesome": "~4.0.3",
    "angular-bootstrap-affix": "~0.3.0"
  }
...

I don't know what the following output even means...., what is it doing?

> bower update angular
bower angular#~1.x              cached git://github.com/angular/bower-angular.git#1.2.7
bower angular#~1.x            validate 1.2.7 against git://github.com/angular/bower-angular.git#~1.x
bower angular#>= 1.0.2          cached git://github.com/angular/bower-angular.git#1.2.7
bower angular#>= 1.0.2        validate 1.2.7 against git://github.com/angular/bower-angular.git#>= 1.0.2
bower angular#1.2.3             cached git://github.com/angular/bower-angular.git#1.2.3
bower angular#1.2.3           validate 1.2.3 against git://github.com/angular/bower-angular.git#1.2.3
bower angular#~1.2.3            cached git://github.com/angular/bower-angular.git#1.2.7
bower angular#~1.2.3          validate 1.2.7 against git://github.com/angular/bower-angular.git#~1.2.3
bower angular#~1.x                 new version for git://github.com/angular/bower-angular.git#~1.x
bower angular#~1.x             resolve git://github.com/angular/bower-angular.git#~1.x
bower angular#>= 1.0.2             new version for git://github.com/angular/bower-angular.git#>= 1.0.2
bower angular#>= 1.0.2         resolve git://github.com/angular/bower-angular.git#>= 1.0.2
bower angular#~1.2.3               new version for git://github.com/angular/bower-angular.git#~1.2.3
bower angular#~1.2.3           resolve git://github.com/angular/bower-angular.git#~1.2.3
bower angular#~1.x            download https://github.com/angular/bower-angular/archive/v1.2.8-build.2095+sha.28fc80b.tar.gz
bower angular#>= 1.0.2        download https://github.com/angular/bower-angular/archive/v1.2.8-build.2095+sha.28fc80b.tar.gz
bower angular#~1.2.3          download https://github.com/angular/bower-angular/archive/v1.2.8-build.2095+sha.28fc80b.tar.gz
bower angular#>= 1.0.2         extract archive.tar.gz
bower angular#>= 1.0.2        resolved git://github.com/angular/bower-angular.git#1.2.8-build.2095+sha.28fc80b
bower angular#~1.x             extract archive.tar.gz
bower angular#~1.x            resolved git://github.com/angular/bower-angular.git#1.2.8-build.2095+sha.28fc80b
bower angular#~1.2.3           extract archive.tar.gz
bower angular#~1.2.3          resolved git://github.com/angular/bower-angular.git#1.2.8-build.2095+sha.28fc80b

nothing changed? I'm still on 1.2.3

> git diff
diff --git a/ngapp/app/bower_components/angular/.bower.json b/ngapp/app/bower_components/angular/.bower.json
index dc9d0b6..842a1f3 100644
--- a/ngapp/app/bower_components/angular/.bower.json
+++ b/ngapp/app/bower_components/angular/.bower.json
@@ -11,6 +11,6 @@
     "commit": "b112b099971f4cf016023bdeb00b267e9bf6dfb5"
   },
   "_source": "git://github.com/angular/bower-angular.git",
-  "_target": "~1.2.3",
+  "_target": "1.2.3",
   "_originalSource": "angular"
 }

> bower --version
1.2.8

Am I missing something?

> bower info angular
.... shows all versions including 1.2.7 and 1.2.8-builds as well

解决方案

I think your dependencies are preventing you from updating angular in isolation. E.g., look at bower_components/angular-route/bower.json. You will see a specific version of angular listed as a dependency ("1.2.3") and not a ~/"reasonably close" specifier" ("~1.2.3"). So you are trying to update just angular, but the farthest that bower can take your angular is the current version since you have other packages that depend on exactly that version.

If you do bower update then bower will have the opportunity to update all your packages, including angular-route and other packages that are holding angular back. The updates to these packages will now allow bower to update angular while satisfying dependencies. Also, I think if you identified all those packages depending on a specific angular version (you can see dependencies with bower list) and passed them as arguments like bower update angular angular-mocks angular-resource angular-route angular-sanitize... then bower could also perform the update.

这篇关于为什么不鲍尔更新升级角角我?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆