David Portabella
David Portabella

Reputation: 12730

sbt looks for another version of the requested dependency

project/plugins.sbt

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.28")
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.15.0")

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"

But it fails as follows:

$ 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

Why is it looking for scalajs-bootstrap-v4_sjs1.0.0-M7 instead of scalajs-bootstrap-v4?

The minimal project is here: https://github.com/dportabella/scalajs-bootstrap4-examples

Upvotes: 2

Views: 191

Answers (1)

Mario Galic
Mario Galic

Reputation: 48430

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")

and in 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"

Note the downgrade of Scala to 2.12.6 from 2.12.8.

Upvotes: 3

Related Questions