Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sass --watch detects change, yet not compiling to CSS

Tags:

css

sass

So I've read Sass watch is detecting changes but not compiling to css and many other places, but nothing seems to help me. When the .css file is first created, it returns that it has made 'front-page.css' etc. This all works, until you continue to make updates and it just says 'Change detected to: ...' but doesn't update the .css file. Any idea as to why this is happening? Thanks!

From the terminal:

sass --watch scss/front-page.scss:front-page.css
>>> Sass is watching for changes. Press Ctrl-C to stop.
[Listen warning]:
  Listen will be polling for changes. Learn more at "..."
>>> Change detected to: scss/front-page.scss
      write front-page.css
      write front-page.css.map
>>> Change detected to: scss/front-page.scss
>>> Change detected to: scss/front-page.scss

In summary, it creates the file, it detects changes, but doesn't update the CSS file.

like image 976
aaronb Avatar asked Nov 27 '22 18:11

aaronb


1 Answers

It seems something gets corrupted in SCSS's cache which makes it impossible for SCSS to properly compile the output.

This issue is resolved by deleting the .sass-cache directory in the folder where you run the command.

like image 194
Hampus Nilsson Avatar answered Nov 29 '22 12:11

Hampus Nilsson