刚在Mac和Windows上安装了全新的稳定Sass 3.3.0(Maptastic Maple).当使用-f --update sass:css它的工作正常.但是在使用时--watch我会得到一个NoMethodError错误.
没有--trace:
C:\RemoteProjects\sass-sourcemaps>sass --style expanded --sourcemap --watch sass:css
>>> Sass is watching for changes. Press Ctrl-C to stop.
NoMethodError:
Run Code Online (Sandbox Code Playgroud)
使用--trace
C:\RemoteProjects\sass-sourcemaps>sass --style expanded --watch ./:../css --trace
>>> Sass is watching for changes. Press Ctrl-C to stop.
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.3.0/lib/sass/plugin/compiler.rb:327:in `listen_to': undefined method `thread' for #<Listen::Listener:0x00000003c95d58> (NoMethodError)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.3.0/lib/sass/plugin/compiler.rb:294:in `watch'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.3.0/lib/sass/plugin.rb:108:in `method_missing'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.3.0/lib/sass/exec.rb:509:in `watch_or_update'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.3.0/lib/sass/exec.rb:346:in `process_result'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.3.0/lib/sass/exec.rb:43:in `parse'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.3.0/lib/sass/exec.rb:22:in `parse!'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.3.0/bin/sass:13:in `<top (required)>'
from C:/Ruby200-x64/bin/sass:23:in `load'
from C:/Ruby200-x64/bin/sass:23:in `<main>'
Run Code Online (Sandbox Code Playgroud)
有人有任何想法吗?我们真的需要这个--watch功能进行本地开发.
感谢Jose Gonzalez链接的https://github.com/nex3/sass/issues/1151页面.如该页面所述,修复方法是删除listenv2.7.0 gem并恢复为listenv2.4.1 gem.
在Mac上,使用下面的命令作为前缀 sudo
gem update sass
listengem,运行:gem list
listenv2.7.0和v2.4.1,那么你需要卸载更新的listensgem.然后它将使用v2.4.1.gem uninstall listen --version '2.7.0'
这对我有用.Sass 3.3.0 --watch命令现在正常工作.
| 归档时间: |
|
| 查看次数: |
793 次 |
| 最近记录: |