SASS的节点和吞吐量 – 堆栈级别太深

尝试使用Gulp将我的SASS编译到.css文件中用于使用指南针,并希望切换到Gulp。 下面这个mixin不是由我创build的,而是正在使用。 其中一个头文件使用mixin bp(做一个断点)

而且这些问题有时也会发生,有时在Gulp运行sass编译时不会发生。 并不总是一样的精确点再现。 我也删除了css文件,并重新编译这个错误。 CSS仍然在那里,似乎工作。 我该怎么办? 思考?

错误插件'sass'

消息:afa / scss / layout / _header-search.scss

SystemStackError:堆栈级别太深

on line 41 of afa/scss/layout/_header-search.scss 

—> @include bp(min-width,$ bp-medium + 1){——— ^

下面是来自文件本身的Mixin

 // ============================================= // Mixin - Breakpoint // ============================================= $mq-support: true !default; $mq-fixed-value: 1024px !default; @mixin bp($feature, $value) { // Set global device param $media: only screen; // Media queries supported @if $mq-support == true { @media #{$media} and ($feature: $value) { @content; } // Media queries not supported } @else { @if $feature == 'min-width' { @if $value <= $mq-fixed-value { @content; } } @else if $feature == 'max-width' { @if $value >= $mq-fixed-value { @content; } } } } /* // ---------------------------------------------- // Usage example: // For IE set $mq-support to false. // Set the fixed value. // Then use mixins to test whether styles should be applied. // ---------------------------------------------- $mq-support: false; $mq-fixed-value: 1024; // Renders at fixed value @include bp (min-width, 300px) { div { color:#000; } } // Doesn't render without MQ support @include bp (min-width, 1200px) { div { color:#FFF; } } // Doesn't render without MQ support @include bp (max-width, 300px) { div { color:#444; } } // Renders at fixed value @include bp (max-width, 1200px) { div { color:#888; } } // ---------------------------------------------- */ 

这是来自_header-search.scss文件的调用

 @include bp(min-width, $bp-medium + 1) { .skip-search { display: none; } } 

事实certificate,这个错误是由sass-gulp包的过时版本引起的。 如果有其他人遇到此问题,请尝试更新到版本3.1.0或更高版本。