2017-10-05 137 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

就發現了這個問題。無論出於何種原因,如果文件位於具有空格的路徑中,它將不起作用。我把這個文件夾移到了「安全地址」,它就像一個魅力一樣。