Visual Studio 代码 - Sass 编译器 - @each 不支持

Visual Studio Code - Sass Compiler - @each not supported

我正在尝试将我的 sass(使用 @each)编译成 css。如: 中所述,不再支持 ritwick 的原始 LIVE SASS 编译器。 Glenn Marks(同名)的新作品浮出水面,声称要更新:

https://github.com/glenn2223/vscode-live-sass-compiler/tree/a1b058d5b1e875efe3b1cf424abd43d40a419540

但是,在编译时,对于 SASS 这一段,我得到:

//color combinations for eachs and mixins
$colors: blood, red, melon, melon2, blue, blue2, blue3, teal, green, green, green, green4, pink, pink2, pink3, orange, orange2, yellow, yellow2, purple, lavender, lilly, brown, gray, gray2, kosmos, soviet, black
@each $color in $colors
    &.color-#{$color}
         .explanation-sidebar ul li a:before,
         .explanation-actions .button
              background: $color

出现以下错误:

Compilation Error
Error: Undefined variable.
     ╷
6546 │         &.color-#{$color}
     │                   ^^^^^^

我见过的唯一推荐的其他编译器(Dart sass)似乎也没有编译我的 sass(只有 scss)所以下一个最好的是什么选项?以前还有其他人 运行 参与过吗?

我通过以下方式修复了它:

1.- 禁用所有扩展(dartjs、实时编译器)

2.- 使用以下方式手动安装 sass:

npm install -g sass

3.- 仅从 glenn marks 重新激活 'live sass compiler'。

我仍然对为什么这以前不起作用感到困惑。 dartjs 和其他扩展的奇怪行为仍然超出我的理解范围,但就目前而言,这是必须要做的。

希望这对以后的人有所帮助。