5

Out of nowhere, all of my stylesheets started throwing errors during compilation.

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 seem to be available in the main less file. The mixins.less file is imported at the very top of my stylesheet and is only imported once.

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

I've also checked each file for a Byte Order Mark, inspired by Variable Name Error "is undefined" even though "variables.less" imported, and even went back 4 weeks in this project's git history (where I'm 100% sure compilation ran successfully). I have had no luck thus far.

Oddly enough, compilation runs successfully using SimpLESS and Less Compiler for Mac.

I've narrowed this down to an importing issue because if I attempt to use a mixin at the top of the stylesheet and error is thrown with that mixin's name.

Anyone familiar with this situation?

I'm using version 2.2.1 of the Less Ruby Gem.

1 Answer 1

1

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

lessc static/css/styles.less

try:

cd static/css
lessc styles.less
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.