Web Compiler fails with message "lessc: EINVAL, fstat"

64 views Asked by At

In my ASP.NET MVC solution I use Web Compiler for compiling LESS files to CSS. This used to work perfectly well for me - and still does for my colleagues - but at some point in the recent past LESS compilation has stopped working on my computer.

My colleagues and I are all using the same compilerconfig.json file which references the input and output files, so the problem can't lie here - and this config file hasn't changed in a long time.

So the problem surely isn't config-related.

We have our development environments set up to compile-on-save and when I either save the file or manually run the task in the Task Explorer I see the following two errors:

  • lessc: EINVAL, fstat
  • FileError: 'bootstrap/mixins.less' wasn't found. Tried - \Content\bootstrap\mixins.less,\Content\bootstrap\mixins.less,bootstrap\mixins.less in \Content\main-styles.less

I'm not sure what the first error means but the second is more frustrating because the first location which the compiler tries is correct.

However, I've found that if I navigate to the location of the LESSC node module then I can manually compile the file at the command prompt.

Any ideas?

0

There are 0 answers