Hi, I've open this issue to share how I fixed a problem encountered when compiling the Admin
LTE less file in conjunction with bootstrap less files. In this scenario i experienced several crashes of less compiler because of OOM.
When you try to compile Bootstrap and AdminLTE in the same file, as I did:
@import (once, less) "admin-lte/build/less/AdminLTE.less";
@import (once, less) "bootstrap-3.3.7/less/bootstrap.less";
with lessc ,gulp-less or similar tools, you will obtain an out of memory problem (OOM).
Analyzing the files i discovered that the problem is caused by these files
To fix this issue simple comment out the following lines
@import (reference) "../bootstrap-less/mixins"; // Just comment this to solve
@import (reference) "../bootstrap-less/variables"; // Just comment this to solve
The exact portion of script that cause problem is in the file _grid-framework.less_ in folder _bootstrap-less/mixins_, at the following lines
// Basic looping in LESS
.loop-grid-columns(@index, @class, @type) when (@index >= 0) {
.calc-grid-column(@index, @class, @type);
// next iteration
.loop-grid-columns((@index - 1), @class, @type);
}
I've got this issue, too, and can confirm that commenting those lines has fixed my problem.
In general, there shouldn't be a reference to internal bootstrap files. Bootstrap should be a package dependency.
As far as I can tell, this bug remains unresolved, even with reference importing.
Most helpful comment
I've got this issue, too, and can confirm that commenting those lines has fixed my problem.
In general, there shouldn't be a reference to internal bootstrap files. Bootstrap should be a package dependency.