sass @import 每次导入报错

发布于 2022-09-05 21:54:30 字数 3348 浏览 11 评论 0

E, [2017-09-12T14:46:47.210813 #8104] ERROR -- : run() in thread failed: incompatible character encodings: UTF-8 and GBK:\n C:/Ruby24-x64/lib/ruby/2.4.0/pathname.rb
C:/Ruby24-x64/lib/ruby/2.4.0/pathname.rb:445:in `block in children'
C:/Ruby24-x64/lib/ruby/2.4.0/pathname.rb:442:in `foreach'
C:/Ruby24-x64/lib/ruby/2.4.0/pathname.rb:442:in `children'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/directory.rb:77:in `_children'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/directory.rb:15:in `scan'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/change.rb:56:in `invalidate'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/adapter/base.rb:114:in `_queue_change'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/adapter/polling.rb:33:in `_process_event'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/adapter/base.rb:42:in `block (2 levels) in configure'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/adapter/polling.rb:24:in `block (2 levels) in _run'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/adapter/polling.rb:23:in `each'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/adapter/polling.rb:23:in `block in _run'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/adapter/polling.rb:21:in `loop'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/adapter/polling.rb:21:in `_run'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/adapter/base.rb:78:in `block in start'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/internals/thread_pool.rb:6:in `block in add'\n\ncalled from:\n C:/Ruby24-x64/lib/ruby/gems/
s-listen/backend.rb:28:in `start'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/listener.rb:67:in `block in <class:Listener>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/fsm.rb:120:in `instance_eval'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/fsm.rb:120:in `call'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/fsm.rb:91:in `transition_with_callbacks!'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/fsm.rb:57:in `transition'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/listener.rb:90:in `start'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.5.1/lib/sass/plugin/compiler.rb:325:in `watch'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.5.1/lib/sass/plugin.rb:109:in `method_missing'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.5.1/lib/sass/exec/sass_scss.rb:360:in `watch_or_update'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.5.1/lib/sass/exec/sass_scss.rb:51:in `process_result'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.5.1/lib/sass/exec/base.rb:52:in `parse'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.5.1/lib/sass/exec/base.rb:19:in `parse!'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.5.1/bin/sass:13:in `<top (required)>'

我是通过命令行的方式,

sass index.scss:index.css --style expanded -l --watch

修改index.scss,但是我新建一个比如_variables.scss,然后在index.scss里面导入就报错

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

嘿哥们儿 2022-09-12 21:54:30

你是写了中文注释吗

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文