Installing Less.css on OSX Lion

Today I was following the instructions to upgrade to the latest version of the Twitter Bootstrap.

It’s pretty straight forward. It is really awesome, actually. All you have to do is: Open the terminal, pull the changes, run make.

But, Twitter Bootstrap uses Less.css, so one of the steps of the update script is to compile the .less files into .css. I didn’t have less compiler installed on my MacBook Pro, so instead of successfully upgrading the Bootstrap, I got this on my terminal:

lessc: command not found

So, my first reaction was to try installing less using Homebrew:

Homebrew doesn’t have a formula for less.css

Dang it. There is not Homebrew formula for Less. I’ll have to open my browser to install a software, damn it. So I headed to Less.css website and saw that the easiest way to install the compiler to be used on the server side is via the node package manager, npm. Then I did: npm install less

npm installed less

All right, now let’s try running make again.

less not found again

Ok. It’s still not found. Maybe installing it globally will solve the problem: npm install less --global

npm install less with global option

All right, now that less is installed globally, let’s try running make again to update Twitter Bootstrap.

Bootstrap upgraded succesfully. Yay!

Yay, it worked. The --global option did the trick.

comments powered by Disqus