【问题标题】:grunt-contrib-sass throwing "Could not find an option named" errorsgrunt-contrib-sass 抛出“找不到名为的选项”错误
【发布时间】:2018-01-11 15:15:57
【问题描述】:

突然之间,我的 grunt-contrib-sass 任务在构建时抛出 Could not find an option named "sourcemap" 错误。我目前安装了 sass 3.5.1 并使用 grunt-contrib-sass 1.0.0。有什么想法可能导致这种情况吗?这是我看到的输出:

Could not find an option named "sourcemap".
Usage: dart-sass <input>
-s, --style         Output style.
                    [expanded (default)]
-c, --[no-]color    Whether to emit terminal colors.
    --[no-]trace    Print full Dart stack traces for exceptions.
-h, --help          Print this usage information.
    --version       Print the version of Dart Sass.
Warning: Exited with error code 64 Used --force, continuing.
Done, but with warnings.
Process terminated with code 0.

而且,这不是编译 CSS。想法?

【问题讨论】:

  • 看起来你已经安装了 dart 并且 dart-sass 现在是 sass 调用的,而不是默认的,预期的 sass?
  • 我认为不是这样,因为如果我运行npm list,我不会在列表中看到它。我确实看到了 npm ERR!无关:ruby@0.6.1 ruby​​-sass@0.0.3 和 sass@1.0.0-beta.2。这些也不在全球范围内,所以我有点困惑。
  • 终于解决了。看起来糟糕的 npm pull 导致我的 node_modules 文件夹过期。

标签: sass gruntjs grunt-contrib-sass


【解决方案1】:

我通过删除 node_modules 文件夹并让 Visual Studio 重新填充此文件夹来解决此问题。

【讨论】:

    【解决方案2】:

    你可能有一个旧的 sass 引擎

    试试sudo gem install sass

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-08-02
      • 2023-03-12
      • 1970-01-01
      • 1970-01-01
      • 2017-10-15
      • 2016-04-08
      • 2014-01-25
      相关资源
      最近更新 更多