在Play框架应用程序中,每次运行“sbt test”时,它都会尝试加载所有节点模块,因为我在应用程序根目录中有package.json。
这是我的sbt文件:
import play.PlayScala
scalaVersion := "2.11.1"
name := """Livrarium"""
version := "0.1"
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-slick" % "0.8.0",
"org.postgresql" % "postgresql" % "9.3-1102-jdbc4",
"com.mohiva" %% "play-silhouette" % "1.0",
"org.scaldi" %% "scaldi-play" % "0.4.1",
"com.sksamuel.scrimage" %% "scrimage-core" % "1.4.1",
"com.sksamuel.scrimage" %% "scrimage-canvas" % "1.4.1",
"org.bouncycastle" % "bcprov-jdk16" % "1.45",
"org.apache.pdfbox" % "pdfbox" % "1.8.6"
)
lazy val root = (project in file(".")).enablePlugins(PlayScala)
正如您所看到的,没有sbt-web。
我可以做些什么来限制sbt加载节点模块吗?
答案 0 :(得分:1)
事实证明我在/project/plugin.sbt
中启用了网络插件删除这些行后:
// web plugins
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.0.0")
sbt stoped尝试加载npm模块。