sass --watch:找不到名为"watch"的选项

Dan*_*iel 6 sass npm

简单一个,但无法在网上找到答案!全球安装sass(npm install -g sass)在我的Mac上.

这按预期工作:

sass style.scss style.css
Run Code Online (Sandbox Code Playgroud)

然后我尝试:

sass --watch style.scss:style.css
Run Code Online (Sandbox Code Playgroud)

得到:

Could not find an option named "watch".

Usage: sass <input> [output]

    --[no-]stdin          Read the stylesheet from stdin.
    --[no-]indented       Use the indented syntax for input from stdin.
-I, --load-path=<PATH>    A path to use when resolving imports.
                      May be passed multiple times.

-s, --style=<NAME>        Output style.
                      [expanded (default), compressed]

-c, --[no-]color          Whether to emit terminal colors.
-q, --[no-]quiet          Don't print warnings.
--[no-]trace          Print full Dart stack traces for exceptions.
-h, --help                Print this usage information.
    --version             Print the version of Dart Sass.
Run Code Online (Sandbox Code Playgroud)

我错过了什么?

谢谢!!

Dan*_*iel 0

最后,我放弃了sass上面的尝试,转而寻求解决方案webpack

我尝试过的另一个有效的选择是使用node-sass.