LESS编译错误ParseError:语法错误第1行 [英] LESS compile error ParseError: Syntax Error on line 1

查看:477
本文介绍了LESS编译错误ParseError:语法错误第1行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过导入我自己的少量文件导入现有的bootstrap.less来对我现有的bootstrap少文件做一些自定义。

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 simple, however I've spend painful couple hours already to try to make new less compiled.

每次我添加我的文件:


ParseError:语法错误在C:\xxx\content\bootst
的第1行上rapee \\xxx.form.less: 9:999 8}

ParseError: Syntax Error on line 1 in C:\xxx\content\bootst rap\less\xxx.form.less:9:999 8 }

我自己的少量档案:

.form-unit {
  background-color: #F5F5F5;
  border-radius: 6px 6px 6px 6px;
  margin-bottom: 30px;
  padding: 10px;
  min-height: 170px;
  position:relative;
}

任何人都有同样的问题吗?我错过了什么?

Anyone have same problems? what did i missed???

我编译它在网上不奇怪它的工作原理,我很困惑

I compiled it online not surprisingly it works, I am so confused

推荐答案

您使用SimpLESS作为LESS编译器?如果是这样,有一个错误,它无法读取以UTF-8编码的文件与BOM。只要将您的文件转换为UTF-8,没有BOM,它会工作。

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.

这篇关于LESS编译错误ParseError:语法错误第1行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆