升华文本3 SASS生成错误,无法生成css文件

升华文本3 SASS生成错误,无法生成css文件,css,sass,sublimetext3,Css,Sass,Sublimetext3,我在Sublime Text3上使用SASSBuild将style.scss保存为嵌套的.css,但退出代码为64时失败 所有安装均成功: -软件包:SASS、SCSS、SASSBuild -使用brew的SASS -从Mac预装Ruby 当我尝试在桌面/scss上保存Tools->Build->SASS with style.scss时,它会显示此消息,但什么也没有发生: Could not find an option named "cache". Usage: sass <inpu

我在Sublime Text3上使用SASSBuild将style.scss保存为嵌套的.css,但退出代码为64时失败

所有安装均成功: -软件包:SASS、SCSS、SASSBuild -使用brew的SASS -从Mac预装Ruby

当我尝试在桌面/scss上保存Tools->Build->SASS with style.scss时,它会显示此消息,但什么也没有发生:

Could not find an option named "cache".

Usage: sass <input.scss> [output.css]
       sass <input.scss>:<output.css> <input/>:<output/>

━━━ Input and 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]

    --update                   Only compile out-of-date stylesheets.

━━━ Source Maps ━━━━━━━━━━━━━━━━━━━━━━━━
    --[no-]source-map          Whether to generate source maps.
                               (defaults to on)

    --source-map-urls          How to link from source maps to source files.
                               [relative (default), absolute]

    --[no-]embed-sources       Embed source file contents in source maps.
    --[no-]embed-source-map    Embed source map contents in CSS.

━━━ Other ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    --watch                    Watch stylesheets and recompile when they change.
    --[no-]poll                Manually check for changes rather than using a native watcher.
                               Only valid with --watch.

    --[no-]stop-on-error       Don't compile more files once an error is encountered.
-i, --interactive              Run an interactive SassScript shell.
-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.
[Finished in 0.1s with exit code 64]
[cmd: ['sass', '--update', '/Users/adrian/Desktop/SCSS/style.scss:/Users/name/Desktop/SCSS/style.css', '--stop-on-error', '--no-cache']]
[dir: /Users/name/Desktop/SCSS]
[path: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin]
找不到名为“cache”的选项。
用法:sass[output.css]
萨斯::
━━━ 输入和输出━━━━━━━━━━━━━━━━━━━
--[no-]stdin从stdin读取样式表。
--[no-]缩进使用缩进语法从标准输入进行输入。
-一、 --加载路径=解析导入时使用的路径。
可以通过多次。
-s、 --样式=输出样式。
[扩展(默认)、压缩]
--仅更新并编译过时的样式表。
━━━ 源地图━━━━━━━━━━━━━━━━━━━━━━━━
--[否-]源映射是否生成源映射。
(默认为on)
--源地图URL如何从源地图链接到源文件。
[相对(默认)、绝对]
--[no-]嵌入源在源地图中嵌入源文件内容。
--[no-]嵌入源地图在CSS中嵌入源地图内容。
━━━ 其他━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
--观察样式表并在它们更改时重新编译。
--[否-]轮询手动检查更改,而不是使用本机观察程序。
仅对--watch有效。
--[no-]出错时停止遇到错误后不要编译更多文件。
-i、 --交互式运行交互式SassScript shell。
-c、 -->[no-]颜色是否发射端子颜色。
-q、 -->[no-]安静-不要打印警告。
--[no-]跟踪打印异常的完整省道堆栈跟踪。
-h、 --帮助打印此使用信息。
--版本打印Dart Sass的版本。
[在0.1s内完成,退出代码64]
[cmd:['sass'、'-update'、'/Users/adrian/Desktop/SCSS/style.SCSS:/Users/name/Desktop/SCSS/style.css'、'-stop on error'、'-no cache']
[dir:/Users/name/Desktop/SCSS]
[路径:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin]

如何让SASSBuild正常工作?提前感谢。

如果安装了Dart SASS(较新的首选模块)而不是节点SASS,则会发生此错误。内置脚本使用
--no cache
选项,该选项在Dart SASS模块中不存在

您可以轻松添加自己的生成文件来代替内置文件:

在Sublime中,选择

Tools > Build System > New Build System...
这将在Sublime用户文件夹中打开一个新文件。使用以下脚本:

{ 
    "cmd" : [
        "sass", 
        "--update", 
        ".:.", 
        "--stop-on-error", 
        "--style", 
        "compressed"
    ],
    "selector": "source.scss"
}
您可以根据需要设置任何选项,例如将压缩更改为扩展


然后,只需保存这个文件(可能是Dart SASS.sublime build),然后从菜单中选择它作为构建系统

你不能用
gulp
wepback
吗?这比升华简单多了。回答得很好-谢谢!