sass @import 每次导入报错

ikobe
  • 154
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里面导入就报错

回复
阅读 2.8k
1 个回答

你是写了中文注释吗

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏