Reputation: 15810
I'm trying to following the quickstart guide here https://lihaoyi.github.io/upickle-pprint/upickle/
Have set the dependency
"com.lihaoyi" %%% "upickle" % "0.3.6",
but the basics seem to fail:
scala> import upickle.default._
import upickle.default._
scala> write(1)
java.lang.ClassCastException: java.lang.Double cannot be cast to scala.scalajs.js.Any
at upickle.json.package$.write(package.scala:38)
at upickle.Types$class.write(Types.scala:125)
at upickle.default$.write(Api.scala:25)
... 35 elided
Upvotes: 0
Views: 561
Reputation: 15812
If you're using it in the REPL, you should use the non-scala.js version of the dependency:
"com.lihaoyi" %% "upickle" % "0.3.6",
Because the REPL runs on Scala-JVM, not Scala.js
Upvotes: 4