Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I had Less Css working on my 12.1 Ubuntu install fine. I was using it by running lessc from command line.

When I run lessc -v I get:

lessc 1.3.0 (LESS Compiler) [JavaScript]

I need to upgrade to 1.3.3, after reading a lot on the web I tried the npm install (as I thought that was how I installed initially) "npm install less" this returned:

npm http GET https://registry.npmjs.org/less
npm http 200 https://registry.npmjs.org/less
npm http GET https://registry.npmjs.org/less/-/less-1.3.3.tgz
npm http 200 https://registry.npmjs.org/less/-/less-1.3.3.tgz
npm http GET https://registry.npmjs.org/ycssmin
npm http 200 https://registry.npmjs.org/ycssmin
npm http GET https://registry.npmjs.org/ycssmin/-/ycssmin-1.0.1.tgz
npm http 200 https://registry.npmjs.org/ycssmin/-/ycssmin-1.0.1.tgz
[email protected] node_modules/less

Now however I still get verison 1.3 when running lessc -v.

I think I must have installed originally through apt-get. I am now confused, so to the question.

Is installing through NPM different than apt-get, i.e. a different implementation?

How can I get to a 1.3.3 install?

Many thanks,

share|improve this question
    
NPM is definitely different from installing via apt-get. NPM pulls its files directly from registry.npmjs.org whereas apt-get pulls pre-packaged DEB archives from your local Ubuntu mirror. –  Nathan Osman Feb 13 '13 at 21:44
    
Did you try the nodejs ppa launchpad.net/~chris-lea/+archive/node.js –  Luis Alvarado Feb 13 '13 at 21:46
    
I wonder if what I installed via apt-get is overriding the NPM install (when I installed via NPM it said it was installing 1.3.3 but I only get 1.3 from the command line less -v)? –  Staple Feb 13 '13 at 22:06
    
Hi Luis - thanks for the comment, if I try that PPA do I have to re-install Less somehow? –  Staple Feb 14 '13 at 3:33
    
Nobody out there know how I might get to Less 1.3.3 ? :-( –  Staple Feb 17 '13 at 23:44

1 Answer 1

up vote 0 down vote accepted

To get lessc 1.3.3 I had to

 sudo apt-get remove node-less
 sudo apt-add-repository ppa:chris-lea/node.js
 sudo apt-get update

 sudo apt-get install nodejs npm
 sudo npm install -g less

Otherwise I was also getting version 1.3.0.

I've also had to resort to yui-compressor as uglifyjs doesn't work after this change of libraries.

share|improve this answer
    
Great - thanks, quick question.. when running lessc do you have to run it as sudo? When I run mine without sudo I get an error... –  Staple Feb 26 '13 at 20:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.