0

in a play framework application each time I run "sbt test" it tries to load all node modules due to the fact that I have package.json in application root.

Here is my sbt file:

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)

As you can see, there is no sbt-web.

Is there anything I can do to restrict sbt from loading node modules?

4

1 回答 1

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 停止尝试加载 npm 模块。

于 2014-10-20T06:50:22.613 回答