Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Syntax error in Less doesn't make sense

I'm trying to compile a less file to CSS using lessc (installed by npm).

SyntaxError: Operation on an invalid type in /home/..../static/less/app.less:null:-1
1

Note that the first line is not cut off. The 1 from line two is clearly after a line break, so how am I getting a null:-1? It seems like that is a line reference that proceeds the file. Is this from an include? (I've got two) if so, what does the 1 on the second line mean?

I'm using lessc v1.3.3 installed via NPM on Ubuntu.

like image 532
patrickgamer Avatar asked Mar 23 '26 22:03

patrickgamer


1 Answers

It would help to have a little more info. What version of Less.js are you using? If you're using 1.4.0-beta then try doing either --strict-maths-off or --strict-units-off, or both. There are other 3rd part compilers that simplify things a bit too.

like image 150
jonschlinkert Avatar answered Mar 26 '26 14:03

jonschlinkert



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!