Just this error, found that the problem was a simple syntax error. I will write what worked for me.
The error is :
>> SyntaxError: media definitions require block statements after any >> features in _assets/less/styles.less on line 144, column 2: >> >> 143 >> 144 div { >> 145 .links {
Please note that the error indicates that the line is around 144-145 , below we will see
In the code below, I forgot . (period) when using the built-in .hidden() mixin twitter-bootstrap .
Gives an error message:
SyntaxError: definitions in files require block instructions after any functions in the dir / bar / foo.less directory on line 144, column 2:
A bit misleading as the error is a child of this div on line 149 .
div { // Line 144 .links { .hidden(); } .other-links { // Missing `.` for using the mixin hidden(); // The real error is here on Line 149 } }
Summary:
Make sure that you have no syntax errors in the child elements where the displayed error noticed an error.
- Check intermediate periods before mixins.
hidden() -> .hidden() - Check all other errors
?
Found another syntax error causing this error?
let us know the comment below
source share