Adminlte: less compilation failed after installing v2.4 from bower

Created on 3 Oct 2017  路  12Comments  路  Source: ColorlibHQ/AdminLTE

We have been using the admin-lte from quite long time. But, when we build our app last week and compiled the LESS file which depends on admin-lte LESS files, it failed.

ERROR
$ lessc assets/css/less/app.less assets/css/app.min.css --clean-css="--s1" FileError: '../../../bower_components/bootstrap/less/mixins.less' wasn't found. Tried - {project_path}\assets\vendor\admin-lte\bower_components\bootstrap\less\mixins.less,{project_path}\bower_components\bootstrap\less\mixins.less,..\..\..\bower_components\bootstrap\less\mixins.less in {project_path}\assets\vendor\admin-lte\build\less\skins\skin-blue-light.less on line 5, column 1: 4 */ 5 @import "../../../bower_components/bootstrap/less/mixins.less"; 6 @import "../../../bower_components/bootstrap/less/variables.less";

Since bower installed the latest admin-lte(v2.4) which does not include the bower-components folder, when we compiled the LESS file it didn't get the bootstrap mixins and variables file from bower_components folder.

Please help to fix this.

Most helpful comment

Also, why the hell are all the bower_components packaged with the plugin? This is insane 馃槥

All 12 comments

I'm also getting this issue when installing via NPM.

Same problem here!

same problem.

This will fix the problem.

cd node_modulesadmin-lte
bower install

Also, why the hell are all the bower_components packaged with the plugin? This is insane 馃槥

BTW, In my case I forced the version to be 2.3.11.

Fixed in master by providing bootstrap less files in the build directory.

Thanks for reporting the issue!

This issue should be opened again, since you missed line 11 & 12 in bootstrap-social.less and so the npm version still fails. No less files from this projects should reference less files from the bower components. Especially not since the bootstrap less files are already in the build folder.

Thanks @almasaeed2010 for providing a quick fix. However, I'm still facing the issue.

You have forgotten to update the bootstrap less dependency PATH in skin's less file (some less file still contains ../../../bower_components/bootstrap/less/mixins.less path which does not exist) which is causing the failure while compiling the less file.

Please help to fix this.

Fix works fine for me.

from : ../../bower_components/bootstrap/less/mixins
if you have own in bower bootstrap: ../../../bootstrap/less/mixins
if not: ../bootstrap-less/mixins

same for variables

the npm run dev command works well after doing what it says @vingrad, but now it happens that the menu does not work well

cd node_modulesadmin-lte
bower install

What am i supposed to do with non stop "ECMDERR Failed to execute git ls-remote...." errors on random packages?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

acacha picture acacha  路  4Comments

REJack picture REJack  路  3Comments

GuxMartin picture GuxMartin  路  3Comments

LeoYong95 picture LeoYong95  路  4Comments

tester10 picture tester10  路  3Comments