gpt4 book ai didi

AngularJS应用程序部署到Heroku,无法找到合适的Angular-animate版本

转载 作者:行者123 更新时间:2023-12-02 22:27:01 25 4
gpt4 key购买 nike

我正在将 AngularJS 应用程序部署到 Heroku,但在控制台中收到此错误:

remote: bower    ECONFLICT Unable to find suitable version for angular-animate
remote:
remote: ! Push rejected, failed to compile Node.js app
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected to test-app-12345

问题(当然)似乎与 angular-animate 依赖项有关。

我正在使用 Heroku angularJS 构建包“Yo Angular”,并遵循他们的 4 步流程将应用程序成功部署到 Heroku。

我尝试通过更改我的 bower.json 文件来解决此问题,如 this StackOverflow answer 中的建议。 ,希望它能解决我的问题。它没。

在本地,我使用 gruntserve 来启动应用程序,这对我来说效果很好。

我的 bower.json 看起来像这样:

{
"name": "dashboard",
"version": "0.0.0",
"main": "index.html",
"ignore": [
"**/.*",
"node_modules",
"bower_components"
],
"dependencies": {
"jquery": "~2.0",
"bootstrap": "~3.1.1",
"angular": "~1.3.15",
"angular-ui-router": "~0.2",
"angular-animate": "~1.3.15",
"angular-resource": "~1.3.15",
"angular-cookies": "~1.3.15",
"angular-mocks": "~1.3.15",
"angular-ui-utils": "~0.1",
"angular-bootstrap": "~0.11.2",
"moment": "~2.5",
"less.js": "~1.6",
"font-awesome": "~4.2.0",
"form-builder": "0.1.0",
"restangular": "~1.4.0",
"lodash": "~2.4.1",
"satellizer": "~0.3.2",
"angular-xeditable": "~0.1.8",
"fullcalendar": "~2.1.1",
"angular-ui-calendar": "~0.8.1",
"checklist-model": "~0.1.3"
},
"resolutions": {
"font-awesome": "~4.2.0",
"jquery": "~2.0",
"fullcalendar": "~2.1.1",
"angular": "~1.3.15",
"angular-bootstrap": "~0.11.2"
}
}

该代码目前是公开的,因此这里是 Github repo 的链接.

有人可以给我建议,或者知道我做错了什么吗?

附注我发现this informationbower的Github问题跟踪中,正在处理同样的问题。可能有助于解决这个问题。

最佳答案

当两个包引用同一依赖项的不同版本时,会发生此错误。

您可以通过运行 rm -rf bower_components/ ; bower install 来解决该问题

然后,当提示您选择版本时,请在答案前加上“!”就像我下面的那样。 注意 Bower 如何添加 "resolutions"部分。

Unable to find a suitable version for angular-animate, please choose one:
1) angular-animate#~1.2 which resolved to 1.2.28 and is required by form-builder#0.1.0
2) angular-animate#~1.3.15 which resolved to 1.3.17 and is required by dashboard
3) angular-animate#~1.4.3 which resolved to 1.4.3

Prefix the choice with ! to persist it to bower.json

? Answer: !3

这是您已解决的 bower.json文件。

{
"name": "dashboard",
"version": "0.0.0",
"main": "index.html",
"ignore": [
"**/.*",
"node_modules",
"bower_components"
],
"dependencies": {
"jquery": "~2.0",
"bootstrap": "~3.1.1",
"angular": "~1.3.15",
"angular-ui-router": "~0.2",
"angular-animate": "~1.4.3",
"angular-resource": "~1.3.15",
"angular-cookies": "~1.3.15",
"angular-mocks": "~1.3.15",
"angular-ui-utils": "~0.1",
"angular-bootstrap": "~0.11.2",
"moment": "~2.5",
"less.js": "~1.6",
"font-awesome": "~4.2.0",
"form-builder": "0.1.0",
"restangular": "~1.4.0",
"lodash": "~2.4.1",
"satellizer": "~0.3.2",
"angular-xeditable": "~0.1.8",
"fullcalendar": "~2.1.1",
"angular-ui-calendar": "~0.8.1",
"checklist-model": "~0.1.3"
},
"resolutions": {
"font-awesome": "~4.2.0",
"jquery": "~2.0",
"fullcalendar": "~2.1.1",
"angular": "~1.3.15",
"angular-bootstrap": "~0.11.2",
"angular-animate": "~1.4.3"
}
}

关于AngularJS应用程序部署到Heroku,无法找到合适的Angular-animate版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31308843/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com