Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Hi Im trying to get the LessCss command line compiler installed on a Mac.

I've tried

brew install less
Error: No available formula for less

brew install lessc
Error: No available formula for lessc

sudo npm install -g less
..Installs happily..

sudo npm install -g lessc
npm http GET https://registry.npmjs.org/lessc
npm http 404 https://registry.npmjs.org/lessc
npm ERR! 404 'lessc' is not in the npm registry.

npm install less --global
..Installs happily..

npm install lessc --global
npm http GET https://registry.npmjs.org/lessc
npm http 404 https://registry.npmjs.org/lessc
npm ERR! 404 'lessc' is not in the npm registry.

and all I get is

less js/less/style.less > style-theme.css
-bash: less: command not found

lessc js/less/style.less > style-theme.css
-bash: lessc: command not found

Does anyone have any experience with this?


I found something said my path variable might be messed up. This:

/bin/echo $PATH

gets me:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin
share|improve this question
    
How did you install node? Homebrew? –  jibsales Oct 10 '13 at 20:54

1 Answer 1

the npm package name for lessc is less

try writing

sudo npm install -g less
share|improve this answer
    
Ya I did that too, I looked at the NPM page. I think my path variable might be messed up. /bin/echo $PATH gets me/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin –  RachelD Sep 21 '13 at 1:53
    
it looks fine, make sure you have lessc in one of those paths, if not search for it and add it's directory to your $PATH –  amdorra Sep 21 '13 at 1:58
    
Thats exactly what Im doing. I've checked in /usr/local but I haven't found where Node was installed yet. –  RachelD Sep 21 '13 at 2:03
    
the path for lessc shortcut on my ubuntu machine is /usr/local/bin/lessc and the actual path is /usr/local/lib/node_modules/less/bin/lessc –  amdorra Sep 21 '13 at 2:10
    
Hmmm When I ls /usr/local/lib/node_modules all I get is npm... I wonder where I'm installing global modules then... –  RachelD Sep 21 '13 at 2:17

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.