Until yesterday Sass was working just fine, now, Sass doesn't compile my SCSS file anymore.
Here's what I've tried so far but nothing fixes the problem:
Technical information:
sass --watch scss:css --style compact --compass --debug-info
Other information:
Something weird that happens is that if I write something incorrect in my .scss
file, for example a four digit hex value for a color like #f00a
and then run --watch
, Sass immediately detects the problem, and rewrites the .css
file with the error.
This means that Sass is, in some way, partially working.
After typing all the --watch
commands, Sass initiates normally saying: >>> Sass is watching for changes. Press Ctrl-C to stop.
However, when I save my .scss
file, Sass doesn't compile anymore. It just stays there.
Has anyone else had this issue where Sass just stops compiling?
Thing is that now I can't work on my projects anymore since there's no way to create CSS files anymore, so any help on this is immensely appreciated.
Thanks.
--UPDATE
I'm still not able to compile.
However, after stopping the --watch
I get a huge list of items in my CMD. In my home PC Sass is working fine and when I stop the --watch
I don't get any list like this one or anything:
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?
scss is compiled into CSS when you save your project manually or automatically and how the changes to _grid.
Add the following to the <head> tag of your HTML file. The extension we installed will compile the SASS file index. scss into CSS and store the compiled code in a new CSS file, also called index. css .
I experienced a similar issue, but using Sass with Compass. Luckily I managed to solve the problem by running the compass clean
command which removes the .sass-cache
files and the compiled .css files. Then just run the compass --watch
command again. Hope this might help someone else.
Admittedly this was very stupid of me, but it did happen to be the problem I had when stumbling upon this stackoverflow Q&A.
This was the simple answer to my very simple problem:
Make sure you're @importing the file in your main style.scss file.
Clearly not the answer to your very complex problem, but it may help some newbie who was in a similar position to me!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With