0

似乎 SBT 找不到任何所需的依赖项,而且 blooper 和 sbt 似乎都无法在线连接以下载任何依赖项。我检查了我是否有代理,是否有任何不一致的版本冲突,并完全重新安装了 SBT、NVM、VSCode 和其他所有相关内容。我似乎无法弄清楚为什么它不会构建以及为什么它找不到任何依赖项。

编辑:添加 Build.sbt 文件

我已经从 repo 链接中删除了 https://,但它们在正常错误中存在。

build.sbt 文件:

import Dependencies._

ThisBuild / scalaVersion     := "2.12.11"
ThisBuild / version          := "0.1.0-SNAPSHOT"
ThisBuild / organization     := "????"
ThisBuild / organizationName := "????"


lazy val root = (project in file("."))
  .settings(
    name := "ScalaJS-only",
    libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "1.0.0",
    libraryDependencies += scalaTest % Test,
        scalaJSUseMainModuleInitializer := true
  ).enablePlugins(ScalaJSPlugin)

收到错误:

PS C:\Users\????\Documents\Backend> sbt     
[info] Loading settings for project Backend-build-build-build from metals.sbt ...    
[info] Loading project definition from C:\Users\????\Documents\Backend\project\project\project
Oct 19, 2021 11:46:44 AM lmcoursier.internal.shaded.coursier.cache.shaded.org.jline.utils.Log logr    
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)    
[info] Updating    
[info] Resolved  dependencies    
[warn]    
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.    
[warn]          ch.epfl.scala:sbt-bloop:1.4.9 (sbtVersion=1.0, scalaVersion=2.12)    
[warn]    
[warn]  Note: Unresolved dependencies path:    
[error] sbt.librarymanagement.ResolveException: Error downloading org.scala-sbt:sbt:1.3.5    
[error]   Not found    
[error]   Not found    
[error]   wrong checksum: C:\Users\????\Documents\Backend\null\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\sbt\1.3.5\sbt-1.3.5.pom (expected SHA-1 88a91f2b0e535d0c22bc0b9dcc9b586bc6b7a109 in C:\Users\????\Documents\Backend\null\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\sbt\1.3.5\.sbt-1.3.5.pom__sha1, got aea457bc4067a7c2080a43791cdeb78b072ff5bb)    
[error]   not found: C:\Users\????\.ivy2\local\org.scala-sbt\sbt\1.3.5\ivys\ivy.xml    
[error]   not found: repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/sbt/1.3.5/ivys/ivy.xml    
[error]   not found: repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.3.5/ivys/ivy.xml    
[error] Error downloading ch.epfl.scala:sbt-bloop;sbtVersion=1.0;scalaVersion=2.12:1.4.9    
[error]   Not found    
[error]   Not found    
[error]   wrong checksum: C:\Users\????\Documents\Backend\null\Coursier\cache\v1\https\repo1.maven.org\maven2\ch\epfl\scala\sbt-bloop_2.12_1.0\1.4.9\sbt-bloop-1.4.9.pom (expected SHA-1 a9f21bf5ab89ca29d3acbac10c2a7ab74dbf8646 in C:\Users\????\Documents\Backend\null\Coursier\cache\v1\https\repo1.maven.org\maven2\ch\epfl\scala\sbt-bloop_2.12_1.0\1.4.9\.sbt-bloop-1.4.9.pom__sha1, got 3f431c638c39d83018ca88a348d1fb0e62db43a0)    
[error]   not found: C:\Users\????\.ivy2\local\ch.epfl.scala\sbt-bloop\scala_2.12\sbt_1.0\1.4.9\ivys\ivy.xml    
[error]   not found: repo.scala-sbt.org/scalasbt/sbt-plugin-releases/ch.epfl.scala/sbt-bloop/scala_2.12/sbt_1.0/1.4.9/ivys/ivy.xml    
[error]   not found: repo.typesafe.com/typesafe/ivy-releases/ch.epfl.scala/sbt-bloop/scala_2.12/sbt_1.0/1.4.9/ivys/ivy.xml    
[error] Error downloading org.scala-lang:scala-library:2.12.10    
[error]   Not found    
[error]   Not found    
[error]   wrong checksum: C:\Users\????\Documents\Backend\null\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-lang\scala-library\2.12.10\scala-library-2.12.10.pom (expected SHA-1 368a4cdefd92e20800076e97e3b58e722a7f942a in C:\Users\????\Documents\Backend\null\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-lang\scala-library\2.12.10\.scala-library-2.12.10.pom__sha1, got c0f5237f49d4b4a955c368a646e7eebc8ca3fc84)    
[error]   not found: C:\Users\????\.ivy2\local\org.scala-lang\scala-library\2.12.10\ivys\ivy.xml    
[error]   not found: repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-library/2.12.10/ivys/ivy.xml      
[error]   not found: repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.12.10/ivys/ivy.xml    
[error]         at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:245)         
[error]         at lmcoursier.CoursierDependencyResolution.$anonfun$update$34(CoursierDependencyResolution.scala:214)    
[error]         at scala.util.Either$LeftProjection.map(Either.scala:573)    
[error]         at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:214)    
[error]         at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)    
[error]         at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:52)    
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:102)    
[error]         at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:69)    
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:115)    
[error]         at scala.util.control.Exception$Catch.apply(Exception.scala:228)    
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:115)    
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:96)    
[error]         at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:150)    
[error]         at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:129)    
[error]         at sbt.Classpaths$.$anonfun$updateTask0$5(Defaults.scala:2947)    
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)    
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)    
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:67)    
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:281)    
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)    
[error]         at sbt.Execute.work(Execute.scala:290)    
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:281)    
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)    
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)    
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)    
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)    
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)    
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)    
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)    
[error]         at java.base/java.lang.Thread.run(Thread.java:834)    
[error] (update) sbt.librarymanagement.ResolveException: Error downloading org.scala-sbt:sbt:1.3.5    
[error]   Not found    
[error]   Not found    
[error]   wrong checksum: C:\Users\????\Documents\Backend\null\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\sbt\1.3.5\sbt-1.3.5.pom (expected SHA-1 88a91f2b0e535d0c22bc0b9dcc9b586bc6b7a109 in C:\Users\????\Documents\Backend\null\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\sbt\1.3.5\.sbt-1.3.5.pom__sha1, got aea457bc4067a7c2080a43791cdeb78b072ff5bb)    
[error]   not found: C:\Users\????\.ivy2\local\org.scala-sbt\sbt\1.3.5\ivys\ivy.xml    
[error]   not found: repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/sbt/1.3.5/ivys/ivy.xml    
[error]   not found: repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.3.5/ivys/ivy.xml    
[error] Error downloading ch.epfl.scala:sbt-bloop;sbtVersion=1.0;scalaVersion=2.12:1.4.9    
[error]   Not found    
[error]   Not found    
[error]   wrong checksum: C:\Users\????\Documents\Backend\null\Coursier\cache\v1\https\repo1.maven.org\maven2\ch\epfl\scala\sbt-bloop_2.12_1.0\1.4.9\sbt-bloop-1.4.9.pom (expected SHA-1 a9f21bf5ab89ca29d3acbac10c2a7ab74dbf8646 in C:\Users\????\Documents\Backend\null\Coursier\cache\v1\https\repo1.maven.org\maven2\ch\epfl\scala\sbt-bloop_2.12_1.0\1.4.9\.sbt-bloop-1.4.9.pom__sha1, got 3f431c638c39d83018ca88a348d1fb0e62db43a0)    
[error]   not found: C:\Users\????\.ivy2\local\ch.epfl.scala\sbt-bloop\scala_2.12\sbt_1.0\1.4.9\ivys\ivy.xml    
[error]   not found: repo.scala-sbt.org/scalasbt/sbt-plugin-releases/ch.epfl.scala/sbt-bloop/scala_2.12/sbt_1.0/1.4.9/ivys/ivy.xml    
[error]   not found: repo.typesafe.com/typesafe/ivy-releases/ch.epfl.scala/sbt-bloop/scala_2.12/sbt_1.0/1.4.9/ivys/ivy.xml    
[error] Error downloading org.scala-lang:scala-library:2.12.10    
[error]   Not found    
[error]   Not found
[error]   wrong checksum: C:\Users\????\Documents\Backend\null\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-lang\scala-library\2.12.10\scala-library-2.12.10.pom (expected SHA-1 368a4cdefd92e20800076e97e3b58e722a7f942a in C:\Users\????\Documents\Backend\null\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-lang\scala-library\2.12.10\.scala-library-2.12.10.pom__sha1, got c0f5237f49d4b4a955c368a646e7eebc8ca3fc84)    
[error]   not found: C:\Users\????\.ivy2\local\org.scala-lang\scala-library\2.12.10\ivys\ivy.xml    
[error]   not found: repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-library/2.12.10/ivys/ivy.xml 
[error]   not found: repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.12.10/ivys/ivy.xml
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
4

0 回答 0