我正在使用SpBowerBundle管理我的Symfony2项目上的JS库.它工作到几天前,当我尝试升级包时,我收到此错误:
bower ECONFLICT Unable to find suitable version for moment
我怀疑问题出在我的bower.json文件上,因为我正在使用的软件包版本.这是上述文件的内容:
{
"name": "AppBundle",
"dependencies": {
"jquery": "latest",
"jquery-migrate": "latest",
"bootstrap": "latest",
"font-awesome": "latest",
"bootstrapvalidator": "master",
"pwstrength-bootstrap": "latest",
"select2": "latest",
"fuelux": "latest",
"moment": "master",
"x-editable": "latest",
"datatables": "latest",
"bootbox": "latest",
"knockout": "latest",
"jquery-file-upload": "latest"
}
}
然后,
>我如何找到冲突包?任何日志?
>如何安装每个软件包的最新版本?我的意思是我应该使用哪个字符串?
解决方法:
冲突的包是“时刻”,你可以看到它的错误信息:
bower ECONFLICT Unable to find suitable version for moment
使用最新版本的bower,您可以获得有关冲突的更多信息:
Unable to find a suitable version for moment, please choose one:
1) moment#master which resolved to d5ff2cfc00 and is required by AppBundle
2) moment#2.7.0 which resolved to 2.7.0 and is required by fuelux#3.2.1
您的bower.json中设置的时刻依赖项与“fuelux”所需的时间依赖性之间存在冲突.
要解决冲突,您可以将以下内容添加到bower.json中以强制使用特定版本的时刻:
"resolutions": {
"moment": "2.7.0"
}