When using Scala.js 0.6.20 (addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.20")
in project/plugins.sbt
), the following error happens when trying to sbt import the project using sbt 0.13.15:
java.lang.NoSuchMethodError: sbt.package$.Zero()Lsbt/Global$;
at org.scalajs.sbtplugin.ScalaJSPluginInternal$.org$scalajs$sbtplugin$ScalaJSPluginInternal$$scalaJSStageSettings(ScalaJSPluginInternal.scala:254)
at org.scalajs.sbtplugin.ScalaJSPluginInternal$$anonfun$22.apply(ScalaJSPluginInternal.scala:446)
at org.scalajs.sbtplugin.ScalaJSPluginInternal$$anonfun$22.apply(ScalaJSPluginInternal.scala:446)
at scala.Function2$$anonfun$tupled$1.apply(Function2.scala:54)
at scala.Function2$$anonfun$tupled$1.apply(Function2.scala:53)
Similar problem: https://gitter.im/scala-js/scala-js?at=59b53890b59d55b823db1dcd
As the release notes mention, Scala.js 0.6.20 requires sbt 0.13.16 or above. To achieve this, the project/build.properties
file should be modified to set:
sbt.version=0.13.16
(or something compatible)
Alternative: downgrade scala.js to 0.6.19
(say, for Coursera course capstone)
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.19") >> project/plugins.sbt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With