My multi platform build is failing with an error, that indicates that both JVM and JS dependencies are in the class path. How can this be?
[error] |Toplevel definition EnableReflectiveInstantiation is defined in
[error] | /home/runner/.cache/coursier/v1/https/repo1.maven.org/maven2/org/portable-scala/portable-scala-reflect_sjs1_2.13/1.1.2/portable-scala-reflect_sjs1_2.13-1.1.2.jar(org/portablescala/reflect/annotation/package.class)
[error] |and also in
[error] | /home/runner/.cache/coursier/v1/https/repo1.maven.org/maven2/org/portable-scala/portable-scala-reflect_2.13/1.1.2/portable-scala-reflect_2.13-1.1.2.jar(org/portablescala/reflect/annotation/EnableReflectiveInstantiation.class)
[error] |One of these files should be removed from the classpath.
These kind of errors happen, if one or more of your dependencies in sbt uses the non platform aware operator
%%instead of platform aware%%%. And therefore adding a JVM dependency to your JS build