SCSS file not compiling anymore

Sass worked very well until yesterday, now Sass no longer compiles my SCSS file.

Here is what I have tried so far, but nothing fixes the problem:

  • Uninstall the current version of Sass and install the old version
  • Install the latest version of Sass
  • Uninstall Ruby and install the latest version
  • Rebooting my machine.

Technical information:

  • Win7 64b
  • Sass version 3.2.3
  • Compass version 0.12.2
  • Used CMD sass --watch scss:css --style compact --compass --debug-info : sass --watch scss:css --style compact --compass --debug-info
  • Editor: Sublime Text 2

Other information:

Something strange is that if I write something wrong in my .scss file, for example a four-digit hexadecimal value for a color like #f00a , and then starts --watch , Sass immediately detects the problem and overwrites .css with an error.

This means that Sass partially works.

After entering all the commands --watch Sass initiates, usually saying: >>> Sass is watching for changes. Press Ctrl-C to stop. >>> Sass is watching for changes. Press Ctrl-C to stop.

However, when I save the .scss file, Sass no longer compiles. He just stays there.

Has anyone else had this problem when Sass just stops compiling?

The fact is that now I can no longer work on my projects, since there is no longer the ability to create CSS files, so any help on this is very much appreciated.

Thanks.

- UPDATE

I still can not compile.

However, after stopping --watch I get a huge list of items in CMD. In my home PC, Sass works fine, and when I stop --watch , I don't get a list like this, or anything else:

 Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. c:\...\www>sass --watch scss:css --style compact --compass --debug-info --trace >>> Sass is watching for changes. Press Ctrl-C to stop. C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/util/multibyte_string_sc anner.rb:36:in `scan': Interrupt from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/util/multibyte_string_scanner.rb:36:in `scan' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:1142:in `tok' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:865:in `value!' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:845:in `declaration' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:568:in `block in declaration_or_ruleset' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:1090:in `block in catch_error' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:1090:in `catch' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:1090:in `catch_error' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:567:in `declaration_or_ruleset' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:540:in `block_child' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:532:in `block_contents' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:521:in `block' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:515:in `ruleset' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:539:in `block_child' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:532:in `block_contents' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:70:in `stylesheet' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/scss/parser.rb:27:in `parse' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/engine.rb:342:in `_to_tree' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/engine.rb:315:in `_render' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/engine.rb:262:in `render' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/plugin/compiler.rb:341:in `update_stylesheet' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/plugin/compiler.rb:203:in `block in update_stylesheets' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/plugin/compiler.rb:201:in `each' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/plugin/compiler.rb:201:in `update_stylesheets' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/plugin/compiler.rb:235:in `watch' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/plugin.rb:107:in `method_missing' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/exec.rb:444:in `watch_or_update' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/exec.rb:307:in `process_result' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/exec.rb:41:in `parse' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/exec.rb:21:in `parse!' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.3/bin/sass:8:in `<top(required)>' from C:/Ruby193/bin/sass:23:in `load' from C:/Ruby193/bin/sass:23:in `<main>' Terminate batch job (Y/N)? 

Is there something wrong with the CSS parser or something?

+6
source share
3 answers

I found a problem: one of the .scss files in my / scss folder was causing Sass to stop compiling.

The “problematic” file was an old copy of the main project .scss file, but when I compared this old version with the latest version, I see only a few differences in terms of properties, values ​​and media queries at the bottom of the code.

In addition, both “problematic” and “correct / working” files are almost equal to 98%.

Read the more extensive answer in the list of project issues on GitHub: https://github.com/nex3/sass/issues/362#issuecomment-11255429

+3
source

I had a similar problem, but using Sass with Compass. Fortunately, I was able to solve the problem by running the compass clean , which deletes files .sass-cache and compiled .css files. Then just run the compass --watch . Hope this can help someone else.

+17
source

Admittedly, it was very stupid from me , but it was a problem that I encountered when I came across this stackoverflow Q & A.

This was a simple answer to my very simple problem:

Make sure that you @importing the file in your main style.scss file.

It is clear that this is not the answer to your very difficult problem, but it can help a newcomer who was in my similar position!

+5
source

All Articles