gpt4 book ai didi

javascript - 当前 Play 应用程序的 Heroku 部署错误

转载 作者:行者123 更新时间:2023-12-02 04:50:43 25 4
gpt4 key购买 nike

我尝试将新创建的 Play 应用程序部署到 Heroku,但出现以下异常。顺便说一下,当我尝试使用 play debug 运行它时也会发生这种情况。它仅适用于激活器应用程序。知道要更改什么才能将其部署到 heroku 上吗?我敢打赌缺少一个 repo 协议(protocol)或其他东西。

remote:        [warn]   ::::::::::::::::::::::::::::::::::::::::::::::
remote: [warn] :: UNRESOLVED DEPENDENCIES ::
remote: [warn] ::::::::::::::::::::::::::::::::::::::::::::::
remote: [warn] :: com.typesafe.sbtrc#actor-client-2-10;0.3.1: not found
remote: [warn] ::::::::::::::::::::::::::::::::::::::::::::::
remote: sbt.ResolveException: unresolved dependency: com.typesafe.sbtrc#actor-client-2-10;0.3.1: not found
remote: at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:217)
remote: at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:126)
remote: at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:125)
remote: at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
remote: at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
remote: at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:103)
remote: at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:48)
remote: at sbt.IvySbt$$anon$3.call(Ivy.scala:57)
remote: at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
remote: at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
remote: at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
remote: at xsbt.boot.Using$.withResource(Using.scala:10)
remote: at xsbt.boot.Using$.apply(Using.scala:9)
remote: at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
remote: at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
remote: at xsbt.boot.Locks$.apply0(Locks.scala:31)
remote: at xsbt.boot.Locks$.apply(Locks.scala:28)
remote: at sbt.IvySbt.withDefaultLogger(Ivy.scala:57)
remote: at sbt.IvySbt.withIvy(Ivy.scala:98)
remote: at sbt.IvySbt.withIvy(Ivy.scala:94)
remote: at sbt.IvySbt$Module.withModule(Ivy.scala:115)
remote: at sbt.IvyActions$.update(IvyActions.scala:125)
remote: at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1223)
remote: at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1221)
remote: at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1244)
remote: at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1242)
remote: at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
remote: at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1246)
remote: at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1241)
remote: at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
remote: at sbt.Classpaths$.cachedUpdate(Defaults.scala:1249)
remote: at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1214)
remote: at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1192)
remote: at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
remote: at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
remote: at sbt.std.Transform$$anon$4.work(System.scala:64)
remote: at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
remote: at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
remote: at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
remote: at sbt.Execute.work(Execute.scala:244)
remote: at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
remote: at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
remote: at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
remote: at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
remote: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
remote: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
remote: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
remote: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
remote: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
remote: at java.lang.Thread.run(Thread.java:745)
remote: [error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.sbtrc#actor-client-2-10;0.3.1: not found
remote: [error] Total time: 26 s, completed Mar 9, 2015 4:20:10 PM
remote:
remote: ! ERROR: Failed to run sbt task: update
remote:
remote:
remote: ! Push rejected, failed to compile Play 2.x - Java app

似乎该文件仅在 typesafe 的 ivy 样式存储库中,但是当我将解析器更改为:

resolvers += Resolver.url("Typesafe ivy repository", url("http://repo.typesafe.com/typesafe/ivy-releases/"))(Resolver.ivyStylePatterns)

我收到这个错误:

remote:        [warn]   ::::::::::::::::::::::::::::::::::::::::::::::
remote: [warn] :: UNRESOLVED DEPENDENCIES ::
remote: [warn] ::::::::::::::::::::::::::::::::::::::::::::::
remote: [warn] :: com.typesafe.play#sbt-fork-run-protocol_2.10;2.3.8: not found
remote: [warn] :: com.typesafe.play#routes-compiler_2.10;2.3.8: not found
remote: [warn] :: com.typesafe.play#sbt-run-support_2.10;2.3.8: not found
remote: [warn] ::::::::::::::::::::::::::::::::::::::::::::::
remote: sbt.ResolveException: unresolved dependency: com.typesafe.play#sbt-fork-run-protocol_2.10;2.3.8: not found
remote: unresolved dependency: com.typesafe.play#routes-compiler_2.10;2.3.8: not found
remote: unresolved dependency: com.typesafe.play#sbt-run-support_2.10;2.3.8: not found
remote: at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:217)
remote: at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:126)
remote: at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:125)
remote: at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
remote: at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
remote: at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:103)
remote: at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:48)
remote: at sbt.IvySbt$$anon$3.call(Ivy.scala:57)
remote: at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
remote: at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
remote: at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
remote: at xsbt.boot.Using$.withResource(Using.scala:10)
remote: at xsbt.boot.Using$.apply(Using.scala:9)
remote: at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
remote: at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
remote: at xsbt.boot.Locks$.apply0(Locks.scala:31)
remote: at xsbt.boot.Locks$.apply(Locks.scala:28)
remote: at sbt.IvySbt.withDefaultLogger(Ivy.scala:57)
remote: at sbt.IvySbt.withIvy(Ivy.scala:98)
remote: at sbt.IvySbt.withIvy(Ivy.scala:94)
remote: at sbt.IvySbt$Module.withModule(Ivy.scala:115)
remote: at sbt.IvyActions$.update(IvyActions.scala:125)
remote: at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1223)
remote: at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1221)
remote: at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1244)
remote: at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1242)
remote: at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
remote: at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1246)
remote: at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1241)
remote: at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
remote: at sbt.Classpaths$.cachedUpdate(Defaults.scala:1249)
remote: at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1214)
remote: at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1192)
remote: at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
remote: at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
remote: at sbt.std.Transform$$anon$4.work(System.scala:64)
remote: at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
remote: at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
remote: at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
remote: at sbt.Execute.work(Execute.scala:244)
remote: at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
remote: at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
remote: at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
remote: at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
remote: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
remote: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
remote: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
remote: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
remote: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
remote: at java.lang.Thread.run(Thread.java:745)
remote: [error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.play#sbt-fork-run-protocol_2.10;2.3.8: not found
remote: [error] unresolved dependency: com.typesafe.play#routes-compiler_2.10;2.3.8: not found
remote: [error] unresolved dependency: com.typesafe.play#sbt-run-support_2.10;2.3.8: not found
remote: Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
remote: ! ERROR: Failed to run sbt task: update
remote:
remote:
remote: ! Push rejected, failed to compile Play 2.x - Java app

所以似乎找到了 actor-client,但没有找到其他三个依赖项,而且同时使用这两种类型安全的 repos 似乎也不起作用:(有什么想法吗?

编辑:我调查了一下,如果我使用这些解析器:

resolvers += "Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots"

resolvers += Resolver.url("Typesafe Ivy", url("http://repo.typesafe.com/typesafe/ivy-snapshots"))(Resolver.ivyStylePatterns)

它正确地检查了所有的 repo 协议(protocol):

[warn]   module not found: com.typesafe.play#sbt-run-support_2.10;2.3.8
[warn] ==== typesafe-ivy-releases: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/sbt-run-support_2.10/2.3.8/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-run-support_2.10/2.3.8/ivys/ivy.xml
[warn] ==== local: tried
[warn] /tmp/scala_buildpack_build_dir/.sbt_home/.ivy2/local/com.typesafe.play/sbt-run-support_2.10/2.3.8/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com/typesafe/play/sbt-run-support_2.10/2.3.8/sbt-run-support_2.10-2.3.8.pom
[warn] ==== Sonatype OSS Snapshots: tried
[warn] http://oss.sonatype.org/content/repositories/snapshots/com/typesafe/play/sbt-run-support_2.10/2.3.8/sbt-run-support_2.10-2.3.8.pom
[warn] ==== Typesafe Ivy: tried
[warn] http://repo.typesafe.com/typesafe/ivy-snapshots/com.typesafe.play/sbt-run-support_2.10/2.3.8/ivys/ivy.xml

但是一旦我将普通的类型安全存储库添加为第三个:

resolvers += "Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots"

resolvers += Resolver.url("Typesafe Ivy", url("http://repo.typesafe.com/typesafe/ivy-snapshots"))(Resolver.ivyStylePatterns)

resolvers += "Typesafe" at "http://repo.typesafe.com/typesafe/releases/"

所有解析器都将被忽略,它只会从名称为“Typesafe Releases Repository”的类型安全存储库中检查根本没有配置的内容:

[warn]   module not found: com.typesafe.sbtrc#actor-client-2-10;0.3.1
[warn] ==== local: tried
[warn] /tmp/scala_buildpack_build_dir/.sbt_home/.ivy2/local/com.typesafe.sbtrc/actor-client-2-10/0.3.1/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com/typesafe/sbtrc/actor-client-2-10/0.3.1/actor-client-2-10-0.3.1.pom
[warn] ==== Typesafe Releases Repository: tried
[warn] https://repo.typesafe.com/typesafe/releases/com/typesafe/sbtrc/actor-client-2-10/0.3.1/actor-client-2-10-0.3.1.pom

我找到了适合我的工作解决方案:

一旦你用activator打开play app,在project/play-fork-run.sbt会出现一个新文件,其中包含这一行:

addSbtPlugin("com.typesafe.play" % "sbt-fork-run-plugin" % "2.3.8")

这个 sbt 插件依赖于导致无法在 Heroku 上部署的 actor jar。如果我删除 play-fork-run.sbt 我可以在 Heroku 上部署该项目。这只是一个临时解决方案,因为如果您使用激活器打开应用程序,依赖项将再次添加,但至少可以部署该应用程序。

最佳答案

不确定这个问题在 2018 年是否仍然相关,但答案是使用 sbt 而不是 Activator。

关于javascript - 当前 Play 应用程序的 Heroku 部署错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28947087/

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