Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sass failing to compile - Web Essentials 2013 Update 4

I'm currently using Web Essentials 2013 update 4 to provide support for compiling .scss files in Visual Studio.

The tool has worked fine for me in the past however I have just created a new .scss file and have copied the bootstrap un-minified css into this new file.

Upon saving, the compilation window on the right hand side of the screen fails to update or display the compiled css or any error messages. Meanwhile, the blue bar at the bottom of my Visual Studio screen is stuck on

Compiling 0 dependent file for bootstrap.scss

Failure to compile

Usually I would expect a bootstrap.css file to be generated from this as well as a bootstrap.min.css file but this is not happening.

Does anyone have any ideas how I can restore this back to normal working conditions?

No minified file

like image 521
jezzipin Avatar asked Jan 28 '15 11:01

jezzipin


2 Answers

This was to do with the settings I had in my WebEssentials-Settings.json file. In version 3, the 'UseRubyRuntime' parameter needed to be marked as true to allow it to auto compile into the relevant files. Since version 4 this can be marked as false as WE now has a built in compiler which I believe may have been conflicting with the RubyRuntime version I was trying to use.

like image 156
jezzipin Avatar answered Sep 27 '22 19:09

jezzipin


I had a similar problem, after installing Web Essentials 2013 Update 4 the .scss files started throwing errors like this to the output:

Something went wrong reaching: ... 
SCSS: Site.scss compilation failed: The service failed to respond to this request
Possible cause: Syntax Error!

The only solution for me was this:

  1. Uninstall Web Essentials
  2. Delete %AppData%\Local\Microsoft\VisualStudio\12.0
  3. Delete %AppData%\Roaming\Microsoft\VisualStudio\12.0
  4. Repair VS 2013.4
  5. Reinstall Web Essentials

Source: https://visualstudiogallery.msdn.microsoft.com/56633663-6799-41d7-9df7-0f2a504ca361/view/Discussions/1#15143

And a heads-up: If you import other .scss files, make sure they are in the correct location. When I updated Twitter.Bootstrap.Sass 3.3.3 via NuGet, the related .scss files were moved to a different folder and I had to update references. For example:

Before:

@import "../sass/bootstrap/_utilities.scss";

After:

@import "../stylesheets/bootstrap/_utilities.scss";
like image 41
bubbassauro Avatar answered Sep 27 '22 20:09

bubbassauro