Question

Visual Studio 2012 Update 2

Web Essentials 2.7

Hello, Every time when I try to change or create any .less file, I got this message in css preview:

/*

Compile Error. 
See error list for details


*/

And when I open Error List, I can see this:

LESS: 

This thing same everytime, no description at all. It doesn't depend from code, even this code generate error:

body {
}

What shall I do?

Was it helpful?

Solution

I've been having this issue with Web essentials 2.7 and I still have it with v 3.2. Error message now reads as "LESS: Unrecognised input".

The only way I could get rid off this issue is to save main less file and all imported less files with encoding "UTF-8 without encoding" (File save, open Save As to find this option).

That's strange because Web essentials long time ago told BOM file markers bug was fixed. Also some other guys with same version of Web essentials do not have this issue using the same files.

So try for yourself, maybe it can help.

OTHER TIPS

Look at this:Web Essentials LESS Compiler gives no Error Messages

try to uninstalled Web Essentials, then re-installed them.

Try to add this to the start of your less file:

*{}

Placing @import at the end of my main.less file helped with Compile Error issue.

body{
  background:@bcg-main;
}

@import url('less/variables.less');

It happened to me before. I have to add in my .less files one by one to determine which file breaks the compilation. Then I can look into the file in suspicion and remove the bug.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top