0

I've just cloned bootstrap from the official github repository. When trying to compile the less files using the official less app however, I get the following errors:

errors in less files

...in a number of files. I have in my index.html file:

<link href="../less/bootstrap.less" rel="stylesheet/less"> <script src="../js/less-1.3.0.min.js"></script> 

With both scripts in the correct locations. The directory tree is as follows

-- bootstrap -- js -- html -- less -- img -- docs 

Is there something I am missing to deploy this correctly? I only want to do static html and javascript files for a quick prototype project.

Update: here is the problem i get on the command line trying to build via the make method. Using the latest less.js script from the official website.

enter image description here

2
  • Which official less app ? Commented Sep 21, 2012 at 12:52
  • Sorry - meant to say unofficial less mac app. Should also have mentioned that this is not compiling via the js method either Commented Sep 21, 2012 at 13:04

4 Answers 4

3

my 3 cent: Why do you want to compile single files? You should only compile the "bootstrap.less" file. Not the other ones alone. The "bootstrap.less" includes all @import dependency statements. The "mixins.less" and the "variables.less" for example include most essential informations.

You can't just compile "responsive-navbar.less" because the variable @navbarCollapseWidth is not known there.

BTW: Less.app is not really "official". I use CodeKit (also by Bryan D K Jones) and this tool is smart enough to do the following: I save the my "responsive-navbar.less", it checks out the other files where this file might be included in and then compiles the mother file.

Sign up to request clarification or add additional context in comments.

1 Comment

I realize this is months old now, but here is the correct response: less.app doesn't allow you to compile a single file if there are other less files in the same directory (or included, I can't recall). When you add the single bootstrap.less file, it automatically adds all related files and tries to compile those as well. This could be why it errors out at compile time, not just lack of compatibility.
0

It appears that this app just doesn't support all the features of the Less language.

Check the official Node.js way for server-side compiling.

Related question on a different system (check the workarounds) : SimpLESS won't compile initializr generated Bootstrap

Comments

0

open your variable less file and check if these variables are empty.

@navbarCollapseWidth @warningBorder

it cannot find the .clearfix() function so you have to create it yourself.

Are you sure you copied all the files correct?

1 Comment

As far as I can see all of the files are there correctly - all I did was git clone the repo so I'm not sure how anything wouldn't be there?
0

Twitter Bootstrap has its own Makefile. You need to run make from the command line in the directory where Twitter Bootstrap is on your machine.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.