2017-10-05 139 views
0

我试图编译我的SCSS文件,但我总是得到这个错误。这是新的,因为在Windows 10 Creator Update之前它工作正常。Sass不会编译SCSS(EACCES错误)

这里的错误:

$ sass --no-cache --update --trace app.scss:app.css 
    c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:516:in `initialize': Permission denied @ rb_sysopen - appp.css (Errno::EACCES) 
      from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:516:in `open' 
      from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:516:in `write_file' 
      from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:503:in `update_stylesheet' 
      from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:215:in `block in update_stylesheets' 
      from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:209:in `each' 
      from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:209:in `update_stylesheets' 
      from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin.rb:82:in `update_stylesheets' 
      from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/exec/sass_scss.rb:340:in `watch_or_update' 
      from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/exec/sass_scss.rb:51:in `process_result' 
      from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/exec/base.rb:52:in `parse' 
      from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/exec/base.rb:19:in `parse!' 
      from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/bin/sass:13:in `<top (required)>' 
      from c:/Ruby24-x64/bin/sass:23:in `load' 
      from c:/Ruby24-x64/bin/sass:23:in `<main>' 

我检查编译器在哪里失败,这就是我的了:

513 def write_file(fileName, content) 
514  flag = 'w' 
515  flag = 'wb' if Sass::Util.windows? && options[:unix_newlines] 
516  File.open(fileName, flag) do |file| 
517  file.set_encoding(content.encoding) unless Sass::Util.ruby1_8? 
518  file.print(content) 
519  end 
520 end 

回答

0

就发现了这个问题。无论出于何种原因,如果文件位于具有空格的路径中,它将不起作用。我把这个文件夹移到了“安全地址”,它就像一个魅力一样。