Adminlte: Cannot compile bootstrap + AdminLTE

Created on 3 Feb 2017  路  2Comments  路  Source: ColorlibHQ/AdminLTE

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

  • AdminLTE.less
  • bootstrap-social.less
  • select2.less
  • fullcalendar.less

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);
}

css bug

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.

All 2 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jrlooney picture jrlooney  路  3Comments

GuxMartin picture GuxMartin  路  3Comments

LeoYong95 picture LeoYong95  路  4Comments

tester10 picture tester10  路  3Comments

vbetancourt picture vbetancourt  路  3Comments