scalasbtscala.jswebjars

How to work around broken transitive jsDependencies?


The webjar ecosystem has recently been broken.

See https://github.com/webjars/webjars/issues/1789

org.webjars.npm:react:16.2.0 depends on org.webjars.npm:loose-envify:[1.1.0,2) which now includes newly released version 1.4.0 which depends on org.webjars.npm#js-tokens;[3.0.0,4),[4.0.0,5) which fails to resolve.

How can I force the version of either org.webjars.npm:loose-envify to 1.3.1, or org.webjars.npm#js-tokens to 3.0.2?

I tried https://github.com/japgolly/scalajs-react/commit/6446d73464f5f4836d1af1aff5f750325f8e24f7 but it didn't work.


Solution

  • Answered here by https://github.com/rpiaggio (thank you!)

    Use dependencyOverrides += "org.webjars.npm" % "js-tokens" % "3.0.2"