运行bower install命令时收到以下消息。
bower.json:
{
"name": "test-app",
"version": "1.1.6",
"dependencies": {
"jquery": "2.1.0",
"jquery-bridget": "*",
"angular": "1.3.15",
"json3": "~3.2.6",
"es5-shim": "~2.1.0",
"angular-resource": "1.3.15",
"angular-sanitize": "1.3.15",
"angular-animate": "1.3.15",
"angular-cookies": "1.3.15",
"angular-touch": "1.3.15",
"angular-moment": "~0.6.2",
"angular-loading-bar": "0.6.0",
"angular-masonry": "0.11.0",
"js-cookie": "2.1.3"
},
"devDependencies": {
"angular-mocks": "1.3.15",
"angular-scenario": "1.3.15"
}
}
任何人都可以帮我这里如何继续前进。
谢谢, 桑托什
答案 0 :(得分:2)
这是因为您注入的依赖项需要不同版本的angularJs。要解决它,首先找到一个合适的angularJs兼容版本。然后,您可以将resolutions
添加到bower.json
文件中的对象,并指定组件名称&版本在运行bower命令时自动解决冲突。像这样:
{
"name": "test-app",
"version": "1.1.6",
"dependencies": {
"jquery": "2.1.0",
"jquery-bridget": "*",
"angular": "1.3.15",
"json3": "~3.2.6",
"es5-shim": "~2.1.0",
"angular-resource": "1.3.15",
"angular-sanitize": "1.3.15",
"angular-animate": "1.3.15",
"angular-cookies": "1.3.15",
"angular-touch": "1.3.15",
"angular-moment": "~0.6.2",
"angular-loading-bar": "0.6.0",
"angular-masonry": "0.11.0",
"js-cookie": "2.1.3"
},
"devDependencies": {
"angular-mocks": "1.3.15",
"angular-scenario": "1.3.15"
},
"resolutions": {
"angular": "1.3.15"
}
}
答案 1 :(得分:0)
尝试升级到angular-moment
~0.10
版本
答案 2 :(得分:0)
您可以使用bower
属性明确告诉resolutions
安装特定版本的依赖项。像这样:
"dependencies": {
"jquery": "2.1.0",
"jquery-bridget": "*",
...
},
"resolutions": {
"angular": "1.4.8",
...
}