grunt-contrib-sass 抛出 "Could not find an option named" 错误

grunt-contrib-sass throwing "Could not find an option named" errors

突然间,我的 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。想法?

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

可能你有一个旧的 sass 引擎

尝试sudo gem install sass