无法再使用Webstorm 8.0.2编译引导程序2.3.2 LESS. LESS编译插件.获取编译器错误 [英] Can no longer compile bootstrap 2.3.2 LESS with Webstorm 8.0.2. LESS compile plugin. Getting compiler error(s)
问题描述
我正在更新使用Botstrap v2.3.2和LESS的旧项目之一.它曾经编译时很顺利,但是现在我遇到了这个错误:
I am updating one of my old projects which used Botstrap v2.3.2 with LESS. It used to compile without a hitch, but now I am getting this error:
LESS CSS Compiler Error
mixins.less: Parse Error: Unrecognised input (line 561, column 6) near .spanX
(@index) when (@index > 0) { (~".span@{index}") { .span(@index); } .spanX(@index - 1);
问题似乎在这里:
.spanX (@index) when (@index > 0) {
(~".span@{index}") { .span(@index); } // <-- line 561 in mixins.less
.spanX(@index - 1);
}
不确定是什么问题.有什么想法吗?
Not sure what the problem is. Any thoughts?
推荐答案
在他的注释中,七个阶段最大"重定向: https://stackoverflow.com/a/19553368/2712740
As seven-phases-max redirects in his comment: https://stackoverflow.com/a/19553368/2712740
更改了发生错误的所有实例
changed all instances where the error appeared from
(~".span@{index}") { .span(@index); } // <-- line 561 in mixins.less
到
.span@{index} { .span(@index); } // <-- line 561 in mixins.less
这是由于LESS编译器新版本中的一些重大更改.尽管很烦人,但是这种突破性的改变绝对是有益的(一如既往,样板越少越好).
欢呼
This was due to some breaking change in the new version of LESS compiler. As annoying as they are, this breaking change is definitely for the good (as always, the less boilerplate the better).
cheers
这篇关于无法再使用Webstorm 8.0.2编译引导程序2.3.2 LESS. LESS编译插件.获取编译器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!