1

When I try to install less css compiler under my Ubuntu 13.10 box I get following message and lescss don't working. In what way I can fix the problem? I execute:

sudo npm install -g less

After this I get e list with OK messages:

npm http 304 https://registry.npmjs.org/cryptiles
npm http 304 https://registry.npmjs.org/ctype/0.5.2
npm http 304 https://registry.npmjs.org/combined-stream
npm http GET https://registry.npmjs.org/delayed-stream/0.0.5
npm http 304 https://registry.npmjs.org/sntp
npm http 304 https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5

And list finished with following:

 /usr/local/bin/lessc -> /usr/local/lib/node_modules/less/bin/lessc
    [email protected] /usr/local/lib/node_modules/less
    ├── [email protected]
    ├── [email protected]
    ├── [email protected] ([email protected])
    ├── [email protected] ([email protected])
    └── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

After this when I tried the following commands:

echo "@foo: 25px; #foobar{font-size: @foo};" > style.less
sudo lessc ./style.less ./style.css

I get the following error:

/usr/bin/env: node: No such file or directory

After I executed

ln -s /usr/bin/node /usr/local/bin/nodejs

and created symlinks there is no errors but lessc compiler don't working properly. I have created file to test. It content is:

cat style.less

@color: #4D926F;

#header {
  color: @color;
}
h2 {
  color: @color;
}`

and after trying

lessc styles.less > styles.css

There is created file - styles.css but the file is empty. I also try commands that I tryed before - see top on the post.

lessc styles.less styles.css

But it not working. There is no file as a result. When I tried

sudo npm install -g less

In the last line I receive following error.

npm http 200 https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz
/usr/bin/lessc -> /usr/lib/node_modules/less/bin/lessc
npm ERR! Refusing to delete: /usr/bin/lessc not in /usr/lib/node_modules/less
File exists: /usr/bin/lessc
Move it away, and try again. 

npm ERR! System Linux 3.11.0-19-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "less"
npm ERR! cwd /home/georgi
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /usr/bin/lessc
npm ERR! code EEXIST
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/georgi/npm-debug.log
npm ERR! not ok code 0
9
  • Those exact commands worked for me pasted into my node server. Running ubuntu 12.04 with node installed. Can you run node from where you are (is it in your PATH)? Commented Apr 14, 2014 at 15:34
  • The question is edited. Commented Apr 15, 2014 at 6:38
  • When you type env node --version does it tell you your node version or does it tell you "No such file or directory"? And, what is the output of which env? What distro of Linux are you using? Commented Apr 15, 2014 at 8:13
  • where is your lessc version ? lessc -v Commented Apr 15, 2014 at 10:03
  • lessc -v don't output nothing. Commented Apr 15, 2014 at 10:55

1 Answer 1

2

The > command operator is incorrect in your command. The correct command is :

lessc [sourcefile] [destfile]

For your example, your command is :

lessc styles.less styles.css
Sign up to request clarification or add additional context in comments.

3 Comments

I alto tried lessc styles.less styles.css but there is no file as result.
Try lessc styles.less styles.css --verbose
lessc styles.less styles.css --verbose dont generate error but don't output nothing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.