对于许多Javascript库,当我尝试将它们添加为jsDependencies时出现错误。例如。引导程序4.3.1。
例如,如果我复制此tutorial中概述的build.sbt,则可以毫无问题地运行fastOptJS。但是,如果我添加以下行:
jsDependencies += "org.webjars.npm" % "bootstrap" % "4.3.1" / "4.3.1/bootstrap.js"
我收到此错误:
org.scalajs.core.tools.jsdep.JSLibResolveException:一些参考 JS库无法解决:[错误]-缺少JS库: 4.3.1 / bootstrap.js [错误]源自:repro:compile [错误] [错误]位于 org.scalajs.core.tools.jsdep.DependencyResolver $ .resolveAllResourceNames(DependencyResolver.scala:96) 在[错误] org.scalajs.core.tools.jsdep.DependencyResolver $ .resolveDependencies(DependencyResolver.scala:37) 在[错误] org.scalajs.sbtplugin.ScalaJSPluginInternal $。$ anonfun $ scalaJSConfigSettings $ 46(ScalaJSPluginInternal.scala:690) 在scala.Function1。$ anonfun $ compose $ 1(Function1.scala:44)中出现[错误] 在[错误] sbt.internal.util。$ tilde $ greater。$ anonfun $$ u2219 $ 1(TypeFunctions.scala:40) sbt.std.Transform $$ anon $ 4.work(System.scala:67)上的[错误] 在sbt.Execute。$ anonfun $ submit $ 2(Execute.scala:269)处[错误] sbt.internal.util.ErrorHandling $ .wideConvert(ErrorHandling.scala:16) sbt.Execute.work(Execute.scala:278)处的[错误] sbt.Execute。$ anonfun $ submit $ 1(Execute.scala:269)[错误]在 sbt.ConcurrentRestrictions $$ anon $ 4. $ anonfun $ submitValid $ 1(ConcurrentRestrictions.scala:178) 在[错误] sbt.CompletionService $$ anon $ 2.call(CompletionService.scala:37)[错误] 在java.util.concurrent.FutureTask.run(FutureTask.java:266)[错误] 在 java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511) java.util.concurrent.FutureTask.run(FutureTask.java:266)出现[错误] 在[错误] java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 在[错误] java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624) [error] at java.lang.Thread.run(Thread.java:748)
许多其他库也发生了同样的事情,例如react,react-dom,fontawesome