我正在使用凉亭1.3.12
这是我的bower.json
{
"name": "my_project",
"version": "0.0.0",
"authors": [
"ME <me@email.com>"
],
"main": "index.php",
"license": "None",
"homepage": "http://project.com",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"inuit-layout": "~0.3.2",
"inuit-starter-kit": "~0.2.8",
"inuit-widths": "~0.3.2",
"inuit-widths-responsive": "~0.1.3",
"inuit-clearfix": "~0.2.1",
"angular": "~1.3.3",
"angular-animate": "~1.3.3",
"dropzone": "~3.12.0",
"nouislider": "~7.0.10",
"angular-nouislider": "~0.3.1",
"angular-google-maps": "~2.0.12",
"slick-carousel": "~1.3.15",
"selectize": "~0.8.5",
"angular-selectize2": "~1.1.1"
},
"resolutions": {
"angular": ">=1.2.18",
"selectize": ">=0.9.0"
}
}
注意我正在使用Angular v 1.3
但是当我这样做时...... bower install magnific-popup --save
我看到凉亭已将Angular降级为v1.2.28。
我看到决议中列出了1.2.28,但我不明白为什么这与安装没有重叠依赖的无关包有任何关系。
为什么会发生这种情况,我该如何解决?
更新
如果我从bower.json中删除"dependencies"
键/值,系统会提示我:
Unable to find a suitable version for angular, please choose one:
1) angular#~1.2.6 which resolved to 1.2.28 and is required by angular-nouislider#0.3.1
2) angular#1.3.3 which resolved to 1.3.3 and is required by angular-animate#1.3.3
3) angular#~1.3.3 which resolved to 1.3.13 and is required by letreehouse
4) angular#>=1.2.0 which resolved to 1.3.13 and is required by angular-google-maps#2.0.12Prefix the choice with ! to persist it to bower.json
我应该选择1.3.13
并继续前进吗?或者我应该担心更大的问题吗?
答案 0 :(得分:0)
解决方案块指定在存在依赖冲突时要采用的版本(在您的情况下,您将自己的项目设置为依赖于Angular~1.3.3但是magnific-popup可能需要1.2.28)。由于您的分辨率设置为&gt; = 1.2.18,因此需要1.2.28。当您删除分辨率时,它将无法再确定您想要的版本,因此它会询问您。我会尝试将分辨率设置为1.3.13并查看它是否会影响magnific-popup,如果没有,继续。
答案 1 :(得分:0)
我有一个关于发生了什么的理论,但这只是一种预感......
因此,每当我尝试安装ANYTHING时,bower会检查所有依赖项并应用解决方案,在我的情况下意味着切换到早期版本的Angular。
如果有人可以确认/否定上述任何一点,我欢迎比这更好的答案。
<强>更新强>
@David在上面的评论中证实了我的预感。我最终将Angular v1.3.3设置为分辨率,这是我已经运行的版本。所以现在我可以在不触发降级的情况下运行install
。