gpt4 book ai didi

css - 使用 @at-root 时出现 SASS 错误

转载 作者:行者123 更新时间:2023-11-28 11:34:41 24 4
gpt4 key购买 nike

我正在运行 SASS 3.3.0.rc.2,但出现了一个奇怪的错误。我已经在谷歌上搜索了任何信息花絮,但找不到任何信息。该文件用于 3.3.0 的早期版本。我已经删除了所有 SASS gem 并重新安装,但它仍在发生。当我尝试在文件上运行 Sass 时,出现以下错误:

NoMethodError: undefined method `tabs' for Sass::Tree::CommentNode:Sass::Tree::CommentNode

当我使用 --trace 标志时,我得到以下回溯:

/Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:252:in `block in visit_atroot': undefined method     `tabs' for Sass::Tree::CommentNode:Sass::Tree::CommentNode (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:252:in `each'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:252:in `visit_atroot'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/base.rb:36:in `visit'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:21:in `visit'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:41:in `block in visit_children_without_parent'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:41:in `map'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:41:in `visit_children_without_parent'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:30:in `block in visit_children'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:61:in `with_parent'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:29:in `visit_children'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/base.rb:36:in `block in visit'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:223:in `visit_rule'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/base.rb:36:in `visit'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:21:in `visit'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:41:in `block in visit_children_without_parent'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:41:in `map'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:41:in `visit_children_without_parent'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:30:in `block in visit_children'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:61:in `with_parent'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:29:in `visit_children'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/base.rb:36:in `block in visit'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:74:in `visit_root'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/base.rb:36:in `visit'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:21:in `visit'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/base.rb:24:in `visit'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:6:in `visit'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/root_node.rb:38:in `css_tree'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/root_node.rb:20:in `render'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/engine.rb:275:in `render'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/plugin/compiler.rb:347:in `update_stylesheet'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/plugin/compiler.rb:191:in `block in update_stylesheets'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/plugin/compiler.rb:188:in `each'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/plugin/compiler.rb:188:in `update_stylesheets'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/plugin/compiler.rb:223:in `watch'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/plugin.rb:108:in `method_missing'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/exec.rb:508:in `watch_or_update'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/exec.rb:346:in `process_result'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/exec.rb:43:in `parse'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/exec.rb:22:in `parse!'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/bin/sass:9:in `<top (required)>'
from /usr/bin/sass:23:in `load'
from /usr/bin/sass:23:in `<main>'

我找不到关于此的任何信息,并且该文件没有任何新的更改。有任何想法吗?

EDIT1:我忘了提到我还有其他使用 @at-root 的文件,它们编译得很好。这更让我感到困惑。

最佳答案

看起来它实际上是一个错误。我已经将它归档在 GitHub 上的 SASS 元素中,它很快就会得到解决。这是任何感兴趣或正在搜索的人的问题链接:https://github.com/nex3/sass/issues/1082

关于css - 使用 @at-root 时出现 SASS 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20981705/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com