LESS Ruby Compiler Error

Out of nowhere, all my stylesheets started throwing errors at compile time.

lessc static/css/styles.less
/gems/less-2.2.1/lib/less/js/lib/less/parser.js:385:31: .rounded_corners is undefined (Less::Error)

None of my mixins are available in the main file less. The mixins.less file is imported at the very top of my stylesheet and is imported only once.

@import "mixins.less";
@import "reset.less";
@import "clearfix.less";
@import etc..

I also checked each file for byte ordering, inspired by the variable name error "undefined" even though the variables "without" were imported , and even returned 4 weeks to this git history project (where I am 100% sure that the compilation passed successfully). I still have no luck.

Oddly enough, compilation succeeds using SimpLESS and the Less Compiler for Mac .

I narrowed it down to an import problem, because if I try to use mixin at the top of the stylesheet, and an error will be passed with that name mixin.

Is anyone familiar with this situation?

I am using version 2.2.1 of Less Ruby Gem .

+5
source share
1 answer

I think you need to be in a directory that contains the file you are trying to compile. Instead of running the command:

lessc static/css/styles.less

to try:

cd static/css
lessc styles.less
+1
source

All Articles