0neel
0neel

Reputation: 391

VS 2012 Web Essentials Less Compile Error

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?

Upvotes: 6

Views: 3377

Answers (5)

Alex
Alex

Reputation: 498

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

*{}

Upvotes: 1

Blaise
Blaise

Reputation: 22242

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.

Upvotes: 0

Remigijus Pankevičius
Remigijus Pankevičius

Reputation: 1132

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.

Upvotes: 6

oleg wx
oleg wx

Reputation: 296

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

body{
  background:@bcg-main;
}

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

Upvotes: 0

Zack Yang
Zack Yang

Reputation: 399

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

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

Upvotes: 1

Related Questions