compass watch compiles once, fails to notice further changes

我与影子孤独终老i 提交于 2019-12-03 12:04:42

Turns out the latest version of Compass was the culprit. I uninstalled it and installed version 1.0.0 alpha 13 (I left Sass as is - latest version 3.4.2).

Ran compass watch but that compiled once and terminated itself with a "LoadError on line ['53'] of C: cannot load such file -- wdm..."

I switched to compass watch --poll and now everything is back to normal - Compass watches, compiles, watches, compiles...

Uninstall both sass & compass:

gem uninstall sass
gem uninstall compass

Install - sass version 3.4.0

gem install sass -v 3.4.0

Install - compass version 1.0.1

gem install compass

Now you can run

compass watch 

without --poll

In my case running compass clean helped.

Edit: Managed to completely remove the issue by cd-ing to the working folder (containing the config.rb) and running compass watch from there, rather than giving the compass watch the path as an argument.

cd /path/to/project-dirs
compass watch

I've had exactly same problem. Fastest solution, try to downgrade your compass. It works fine for me. I'm using this version https://rubygems.org/gems/compass/versions/1.0.0.alpha.13. Remember to uninstall your gems first (gem uninstall compass). If "compass watch" command will not work, try compass watch --poll

In my case, i was Using winscp for file transfer.
Compass watch didnot detect any changes in modified.

Did all the above mentioned changes but still did not work.
After hours of debugging found that winscp was preserving the file timestamp and that was causing the issue.

To fix that :
1) In your WinSCP go to Option -> Preferences -> Transfer
2) Edit the preset you are using 3) Uncheck the preserve timestamp option.

That's it!! And compass started detecting changes and writing them.

One thing that fixed it for me was to put all my default styles in screen.scss and delete style.scss and style.css.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!