В настоящее время я занимаюсь разработкой темы liferay, но при компиляции одного из файлов SCSS я получаю следующую ошибку:
[java] Sass::SyntaxError: Invalid CSS after " @each $key": expected "in", was ", $num in $map {"
[java] expected at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:1147
[java] expected at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:1084
[java] tok! at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:1079
[java] each_directive at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:248
[java] send at org/jruby/RubyKernel.java:2093
[java] special_directive at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:174
[java] directive at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:146
[java] block_child at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:553
[java] block_contents at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:545
[java] block at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:534
[java] mixin_directive at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:186
[java] send at org/jruby/RubyKernel.java:2093
[java] special_directive at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:174
[java] directive at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:146
[java] block_child at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:552
[java] block_contents at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:542
[java] stylesheet at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:82
[java] parse at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/scss/parser.rb:27
[java] _to_tree at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/engine.rb:342
[java] to_tree at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/engine.rb:272
[java] visit_import at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:225
[java] send at org/jruby/RubyKernel.java:2097
[java] visit at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/base.rb:37
[java] visit at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:100
[java] visit_import at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:227
[java] collect at org/jruby/RubyArray.java:2318
[java] visit_import at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:227
[java] send at org/jruby/RubyKernel.java:2097
[java] visit at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/base.rb:37
[java] visit at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:100
[java] visit_children at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/base.rb:53
[java] collect at org/jruby/RubyArray.java:2318
[java] visit_children at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/base.rb:53
[java] visit_children at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:109
[java] with_environment at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:121
[java] visit_children at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:108
[java] visit at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/base.rb:37
[java] visit_rule at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:320
[java] send at org/jruby/RubyKernel.java:2097
[java] visit at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/base.rb:37
[java] visit at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:100
[java] visit_children at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/base.rb:53
[java] collect at org/jruby/RubyArray.java:2318
[java] visit_children at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/base.rb:53
[java] visit_children at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:109
[java] with_environment at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:121
[java] visit_children at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:108
[java] visit at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/base.rb:37
[java] visit_root at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:128
[java] send at org/jruby/RubyKernel.java:2097
[java] visit at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/base.rb:37
[java] visit at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:100
[java] send at org/jruby/RubyKernel.java:2097
[java] visit at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/visitors/perform.rb:7
[java] render at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/tree/root_node.rb:20
[java] _render at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/engine.rb:315
[java] render at C:/Users/BARRYC~1/AppData/Local/Temp/liferay/ruby/gems/sass-3.2.12/lib/sass/../sass/engine.rb:262
[java] (root) at <script>:48
[java] Exception in thread "main" org.jruby.embed.EvalFailedException: (SyntaxError) Invalid CSS after " @each $key": expected "in", was ", $num in $map {"
[java] at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:127)
[java] at org.jruby.embed.ScriptingContainer.runUnit(ScriptingContainer.java:1231)
[java] at org.jruby.embed.ScriptingContainer.runScriptlet(ScriptingContainer.java:1224)
[java] at com.liferay.portal.scripting.ruby.RubyExecutor.doEval(RubyExecutor.java:189)
[java] at com.liferay.portal.scripting.ruby.RubyExecutor.eval(RubyExecutor.java:229)
[java] at com.liferay.portal.scripting.ruby.RubyExecutor.eval(RubyExecutor.java:129)
[java] at com.liferay.portal.tools.SassToCssBuilder._parseSassFile(SassToCssBuilder.java:288)
[java] at com.liferay.portal.tools.SassToCssBuilder._parseSassDirectory(SassToCssBuilder.java:247)
[java] at com.liferay.portal.tools.SassToCssBuilder.<init>(SassToCssBuilder.java:139)
[java] at com.liferay.portal.tools.SassToCssBuilder.main(SassToCssBuilder.java:93)
[java] Caused by: org.jruby.exceptions.RaiseException: (SyntaxError) Invalid CSS after " @each $key": expected "in", was ", $num in $map {"
[java] Unable to parse /css/aui.css
[java] Java Result: 1
Файл-нарушитель (aui.css):
$FontAwesomePath: "aui/font-awesome-5/font" !default;
//@import "aui/alloy-font-awesome/scss/variables";
//@import "aui/alloy-font-awesome/scss/mixins-alloy";
//@import "aui/alloy-font-awesome/scss/path-alloy";
.aui {
@import "aui_variables";
$iconSpritePath: '../images/aui/glyphicons-halflings.png' !default;
$iconWhiteSpritePath: '../images/aui/glyphicons-halflings-white.png' !default;
//@import "aui/bootstrap"; // Remove >> Bootstrap 2.3.2
@import "aui/variables-alloy";
@import "aui/variables";
@import "aui/bs4/bootstrap"; // Add >> Bootstrap 3.5
}
Я использую Liferay 6.2 EE GA1, и эту ошибку из того, что я прочитал, возможно, можно исправить, обновив компилятор SCSS (ruby gem).Тем не менее, я не знаю, как к этому подойти.Он использует ant
builder (build.xml).
Если бы я мог либо исправить вышеуказанную ошибку, либо обновить компилятор (или оба?), Это было бы здорово!