grunt-contrib-sass throw"找不到名为"的选项错误

时间:2017-08-03 20:29:01

标签: sass gruntjs grunt-contrib-sass

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

2 个答案:

答案 0 :(得分:1)

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

答案 1 :(得分:0)

可能你有一个旧的 sass 引擎

试试sudo gem install sass