Encountering an issue while compiling less code where a NameError
is triggered, stating that the variable @brand-success is undefined in app/static/css/less/style.less on line 131, column 15. Interestingly, this variable is actually imported from
app/bower_components/bootstrap/less/variables.less
through 'app/bower_components/bootstrap/less/bootstrap.less'
.
During compilation using grunt-contrib-less
, the following output is displayed:
Running "less:files" (less) task
File app/static/css/icons.css created: 0 B - 175 B
File app/static/css/main.css created: 0 B - 152.44 kB
File app/static/css/modal-large.css created: 0 B - 1.29 kB
>> NameError: variable @brand-success is undefined in app/static/css/less/style.less on line 131, column 15:
>> 130 .circle-green {
>> 131 .circle(@brand-success);
>> 132 }
Warning: Error compiling app/static/css/less/style.less Use --force to continue.
The inclusion of
'app/bower_components/bootstrap/less/bootstrap.less'
is confirmed as it is referenced in the file 'vendor.less' within the less directory:
one@node ~/github/lbs/lbs/app/static/css/less $ cat vendor.less
@import 'app/bower_components/bootstrap/less/bootstrap.less';
@import 'app/bower_components/font-awesome/less/font-awesome.less';
one@node ~/github/lbs/lbs/app/static/css/less $
If intentionally altering the path results in an error, indicating that the correct bootstrap.less file is being utilized.
Seeking assistance in identifying the root cause of this issue.
Additional information provided:
one@node ~/github/lbs/lbs/app/static/css/less $ cat main.less
// Main less file for your application.
// Use `@import` to use other less files
// relative to 'app/css' or 'vendor/css'.
@import 'vendor';
@import 'modal-large';
@import 'icons';
@import 'style'
one@node ~/github/lbs/lbs $ !grep
grep -il brand-success -R *
app/bower_components/bootstrap/dist/css/bootstrap.css.map
app/bower_components/bootstrap/less/variables.less
app/static/css/less/style.less
one@node ~/github/lbs/lbs $