Javascript 无法找到jQuery基金会的合适版本 我试图安装基金会,但它不断地与JQuery 冲突。 λ bower install foundation bower foundation#x cached https://github.com/zurb/bower-foundation.git#5.5.1 bower foundation#x validate 5.5.1 against https://github.com/zurb/bower-foundation.git#x bower foundation#* cached https://github.com/zurb/bower-foundation.git#5.5.1 bower foundation#* validate 5.5.1 against https://github.com/zurb/bower-foundation.git#* bower jquery#>= 2.1.0 cached https://github.com/jquery/jquery.git#2.1.3 bower jquery#>= 2.1.0 validate 2.1.3 against https://github.com/jquery/jquery.git#>= 2.1.0 bower modernizr#>= 2.7.2 cached https://github.com/Modernizr/Modernizr.git#2.8.3 bower modernizr#>= 2.7.2 validate 2.8.3 against https://github.com/Modernizr/Modernizr.git#>= 2.7.2 bower jquery.cookie#~1.4.0 cached https://github.com/carhartl/jquery-cookie.git#1.4.1 bower jquery.cookie#~1.4.0 validate 1.4.1 against https://github.com/carhartl/jquery-cookie.git#~1.4.0 bower fastclick#>=0.6.11 cached https://github.com/ftlabs/fastclick.git#1.0.6 bower fastclick#>=0.6.11 validate 1.0.6 against https://github.com/ftlabs/fastclick.git#>=0.6.11 bower jquery-placeholder#~2.0.7 cached https://github.com/mathiasbynens/jquery-placeholder.git#2.0.9 bower jquery-placeholder#~2.0.7 validate 2.0.9 against https://github.com/mathiasbynens/jquery-placeholder.git#~2.0.7 bower ECONFLICT Unable to find suitable version for jquery
我的bower.json文件如下Javascript 无法找到jQuery基金会的合适版本 我试图安装基金会,但它不断地与JQuery 冲突。 λ bower install foundation bower foundation#x cached https://github.com/zurb/bower-foundation.git#5.5.1 bower foundation#x validate 5.5.1 against https://github.com/zurb/bower-foundation.git#x bower foundation#* cached https://github.com/zurb/bower-foundation.git#5.5.1 bower foundation#* validate 5.5.1 against https://github.com/zurb/bower-foundation.git#* bower jquery#>= 2.1.0 cached https://github.com/jquery/jquery.git#2.1.3 bower jquery#>= 2.1.0 validate 2.1.3 against https://github.com/jquery/jquery.git#>= 2.1.0 bower modernizr#>= 2.7.2 cached https://github.com/Modernizr/Modernizr.git#2.8.3 bower modernizr#>= 2.7.2 validate 2.8.3 against https://github.com/Modernizr/Modernizr.git#>= 2.7.2 bower jquery.cookie#~1.4.0 cached https://github.com/carhartl/jquery-cookie.git#1.4.1 bower jquery.cookie#~1.4.0 validate 1.4.1 against https://github.com/carhartl/jquery-cookie.git#~1.4.0 bower fastclick#>=0.6.11 cached https://github.com/ftlabs/fastclick.git#1.0.6 bower fastclick#>=0.6.11 validate 1.0.6 against https://github.com/ftlabs/fastclick.git#>=0.6.11 bower jquery-placeholder#~2.0.7 cached https://github.com/mathiasbynens/jquery-placeholder.git#2.0.9 bower jquery-placeholder#~2.0.7 validate 2.0.9 against https://github.com/mathiasbynens/jquery-placeholder.git#~2.0.7 bower ECONFLICT Unable to find suitable version for jquery,javascript,jquery,json,zurb-foundation,bower,Javascript,Jquery,Json,Zurb Foundation,Bower,我的bower.json文件如下 { "name": "refactor", "private": true, "dependencies": { "jquery": "~1.11.1", "raphael": "1.3.x", "font-awesome": "~4.3.0", "foundation": "x" } } 请尝试将其用于Jquery版本: "jquery": ">= 2.0.0" 但是我认为你只需要基金会作为一个依赖关系
{
"name": "refactor",
"private": true,
"dependencies": {
"jquery": "~1.11.1",
"raphael": "1.3.x",
"font-awesome": "~4.3.0",
"foundation": "x"
}
}
请尝试将其用于Jquery版本:
"jquery": ">= 2.0.0"
但是我认为你只需要基金会作为一个依赖关系:
或:
另请查看此处以了解更多详细信息:
在
bower.json中使用分辨率
{
"name": "refactor",
"private": true,
"dependencies": {
"jquery": "~1.11.1",
"raphael": "1.3.x",
"font-awesome": "~4.3.0",
"foundation": "x"
},
"resolutions": {
"jquery": "~1.11.1"
}
}
这将迫使bower使用特定版本的jQuery。最好的开始方法是
bower cache clean
在那之后,当你
bower安装
它会询问您
“找不到适合的版本,请选择一个:
然后您可以输入!1
或者!2
,或任何最适合您需要的
这实际上是在bower.json中添加了解析块,正如@esbanarango所提到的,但它只是提供了对您正在做的事情的更多控制和理解 使用“jquery”:“>=2.0.0”我刚刚删除了jquery。现在它从基础开始,我不知道它的正确实践或不检查我的答案下面,让我知道如果它工作。谢谢你!非常感谢你!这对我有用!我从npm调试日志中得到的错误消息(在控制台中更神秘一些)表明需要哪个版本的jQuery。这是在为Drupal8站点提供vagrant时发生的。非常感谢!
bower cache clean