这是我第一次尝试教程。
似乎我错过了一些存储库。
错误是:
[warn] module not found: org.scala-js#sbt-scalajs;0.6.2
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/org.scala-js/sbt-scalajs/scala_2.11/sbt_0.13/0.6.2/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-js/sbt-scalajs/scala_2.11/sbt_0.13/0.6.2/ivys/ivy.xml
[warn] ==== local: tried
[warn] C:\Users\fairj_000\.ivy2\local\org.scala-js\sbt-scalajs\scala_2.11\sbt_0.13\0.6.2\ivys\ivy.xml
[warn] ==== Local Maven Repository: tried
[warn] C:\Users\fairj_000\.ivy2\org.scala-js\sbt-scalajs\0.6.2\ivys\ivy.xml
[warn] ==== oschina nexus: tried
[warn] http://maven.oschina.net/content/groups/public/org/scala-js/sbt-scalajs_2.11_0.13/0.6.2/sbt-scalajs-0.6.2.pom
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/scala-js/sbt-scalajs_2.11_0.13/0.6.2/sbt-scalajs-0.6.2.pom
[warn] ==== Typesafe repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/org/scala-js/sbt-scalajs_2.11_0.13/0.6.2/sbt-scalajs-0.6.2.pom
[warn] ==== Typesafe Snapshots: tried
[warn] https://repo.typesafe.com/typesafe/snapshots/org/scala-js/sbt-scalajs_2.11_0.13/0.6.2/sbt-scalajs-0.6.2.pom
[warn] ==== sonatype-snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/org/scala-js/sbt-scalajs_2.11_0.13/0.6.2/sbt-scalajs-0.6.2.pom
[warn] ==== sonatype-public: tried
[warn] https://oss.sonatype.org/content/repositories/public/org/scala-js/sbt-scalajs_2.11_0.13/0.6.2/sbt-scalajs-0.6.2.pom
[warn] ==== Sonatype snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/org/scala-js/sbt-scalajs_2.11_0.13/0.6.2/sbt-scalajs-0.6.2.pom
[warn] ==== Sonatype release: tried
[warn] https://oss.sonatype.org/content/repositories/releases/org/scala-js/sbt-scalajs_2.11_0.13/0.6.2/sbt-scalajs-0.6.2.pom
这是我的project/plugin.sbt
:
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.2")
build.sbt:
name := """scalajstest"""
version := "1.0"
scalaVersion := "2.11.6"
enablePlugins(ScalaJSPlugin)
build.properties:
#Activator-generated Properties
#Mon Apr 13 01:08:48 CST 2015
template.uuid=d9b4f0bf-a417-4065-80af-1184e996ed95
sbt.version=0.13.7
我应该添加额外的存储库吗?它是什么?
答案 0 :(得分:1)
要在评论中继续讨论:
TL; DR:从全局sbt配置中删除scalaVersion := "2.11.x"
。
OP的全局sbt配置中有scalaVersion := "2.11.6"
。这导致构建本身使用Scala 2.11进行编译。
但是,sbt目前使用Scala 2.10编译,相关工件仅针对Scala 2.10发布。因此,为Scala 2.11编译的Scala.js sbt-plugin的查找失败。