【问题标题】:How to make activator dist ignore the package.json in the project root?如何使激活器 dist 忽略项目根目录中的 package.json?
【发布时间】:2015-09-22 09:33:01
【问题描述】:

在运行activator dist 时,npm install 似乎会在日志中显示为[error] (web-assets:jseNpmNodeModules) Problems with NPM resolution. Aborting build. 的步骤中自动执行 在我的设置中,这不应该发生,因为运行构建的 CD 服务器没有配备通过 npm 解析所有依赖项。 如何使用 play plugin 2.4.2 在 sbt 0.13.8 中禁用此自动行为。

【问题讨论】:

    标签: playframework-2.0 typesafe-activator


    【解决方案1】:

    此问题与 JsEngine npmNodeModules 步骤有关。 A Google groups post 提供了以下解决方案以在构建期间禁用此步骤: 如下所示将build.sbt 中的JsEngineKeys 设置为Nil 解决了这个问题:

    lazy val root = (project in file("."))
      .enablePlugins(PlayScala, BuildInfoPlugin)
      .settings(
        // Disable NPM node modules
        JsEngineKeys.npmNodeModules in Assets := Nil,
        JsEngineKeys.npmNodeModules in TestAssets := Nil
      )
    

    【讨论】:

      猜你喜欢
      • 2020-05-23
      • 2015-07-29
      • 2010-12-01
      • 2012-02-21
      • 1970-01-01
      • 2015-11-24
      • 2019-02-13
      • 2015-01-28
      相关资源
      最近更新 更多