mill client.fastOpt: client.scalaJSLinkerClasspath scala.MatchError: 1 (of class java.lang.String)

82 views Asked by At

I want to run a ScalaJS module with mill Build Tool.

When running mill client.fastOpt I get:

[6/73] client.scalaJSLinkerClasspath 
1 targets failed
client.scalaJSLinkerClasspath scala.MatchError: 1 (of class java.lang.String)
    mill.scalajslib.ScalaJSModule.$anonfun$scalaJSLinkerClasspath$2(ScalaJSModule.scala:38)
    mill.define.ApplyerGenerated.$anonfun$zipMap$7(ApplicativeGenerated.scala:17)
    mill.define.Task$MappedDest.evaluate(Task.scala:365)

My build.sc is:

trait BaseJsModule extends ScalaJSModule {
  val scalaJSVersion = "1.0.1"
  val scalaVersion = "2.13.1"
}

object client extends BaseJsModule {
  override def moduleDeps = Seq(shared)
  override def mainClass = Some("pme123.camunda.boot.client.HelloClient")
}

object shared extends BaseJsModule

Do I miss something?

1

There are 1 answers

0
Tobias Roeser On BEST ANSWER

Your posted buildfile looks ok. You're probably using a too old mill version? Support for ScalaJS 1.0.0+ was added in mill 0.6.1.

Please note, that you can create a file .mill-version with the content 0.6.1 to automatically download and use mill 0.6.1.