sbt 查找请求依赖项的另一个版本 [英] sbt looks for another version of the requested dependency
本文介绍了sbt 查找请求依赖项的另一个版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
project/plugins.sbt
project/plugins.sbt
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.28")
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.15.0")
build.sbt(简化版)
build.sbt (simplified)
enablePlugins(ScalaJSBundlerPlugin)
scalaVersion := "2.12.8"
libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "0.9.7"
libraryDependencies += "com.github.karasiq" %%% "scalajs-bootstrap-v4" % "2.3.5"
但失败如下:
$ sbt fastOptJS::webpack
[error] sbt.librarymanagement.ResolveException: unresolved dependency: com.github.karasiq#scalajs-bootstrap-v4_sjs1.0.0-M7_2.12;2.3.5: not found
为什么要寻找 scalajs-bootstrap-v4_sjs1.0.0-M7
而不是 scalajs-bootstrap-v4
?
Why is it looking for scalajs-bootstrap-v4_sjs1.0.0-M7
instead of scalajs-bootstrap-v4
?
最小项目在这里:https://github.com/dportabella/scalajs-bootstrap4-例子
推荐答案
在 project/plugins.sbt
中尝试以下版本,它模仿了 scalajs-bootstrap 的 plugins.sbt
Try the following versions in project/plugins.sbt
which mimics what is in scalajs-bootstrap's plugins.sbt
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.20")
addSbtPlugin("com.github.karasiq" % "sbt-scalajs-bundler" % "1.2.1")
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.13.0")
和build.sbt
scalaVersion := "2.12.6"
libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "0.9.7"
libraryDependencies += "com.github.karasiq" %%% "scalajs-bootstrap-v4" % "2.3.5"
注意 Scala 从 2.12.8 降级到 2.12.6.
Note the downgrade of Scala to 2.12.6 from 2.12.8.
这篇关于sbt 查找请求依赖项的另一个版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文