LESS compile error ParseError: Syntax Error on line 1

前端 未结 4 1679
闹比i
闹比i 2020-12-30 07:25

I am trying to do some customisation on my existing bootstrap less file by importing import my own less file into existing bootstrap.less.

I thought it would be simp

相关标签:
4条回答
  • 2020-12-30 07:35

    If you are using Visual Studio, make sure that you didn't accidentally add the included file to the compile list. Check compilerconfig.json and make sure you aren't trying to compile both the main SASS file and the included one.

    0 讨论(0)
  • 2020-12-30 07:39

    To anyone using Visual Studio and continuing to tear their hair out with the problem above (I've been in the same boat for the last hour or so, and the approved answer above didn't work for me), I'd recommend getting hold of the Web Essentials extension.

    It allows for instant compilation of LESS files into minified CSS whenever they are saved in much the same way as SimpLESS does. No complaints about encoding, line endings or anything else!

    0 讨论(0)
  • 2020-12-30 07:39

    For all .less files used in Visual Studio, you need to change the UTF encoding....

    File > Advanced Save Options...
    Set "Encoding" to "Unicode (UTF-8 without signature) - codepage 65001

    Once you do this, the Simpless compiler will work for your files.

    0 讨论(0)
  • 2020-12-30 07:45

    Are you using SimpLESS as your LESS compiler? If so there's a bug where it can't read files encoded in UTF-8 with BOM. Just convert your file to UTF-8 without BOM and it will work.

    0 讨论(0)
提交回复
热议问题