1

On ubuntu 14.04 I have installed Sublime Text 2 and a plugin named less2css. When I try to save, for example MAIN.less, file is saved, but isn't compiled into MAIN.css. Sublime alerted me that usr/bin/env node no such file or directory.

I don't know why Sublime needs this file, file exist and permissions to this file looks fine for me.

EDIT: the same alert i see when I tray do this from commondline

root@mainPC2:/home/oskar/WORK/__MY/_v10/less# pwd
/home/oskar/WORK/__MY/_v10/less
root@mainPC2:/home/oskar/WORK/__MY/_v10/less# ls -la
razem 12
drwxrwxr-x 2 oskar oskar 4096 wrz 21 15:05 .
drwxrwxr-x 4 oskar oskar 4096 wrz 21 15:06 ..
-rw-rw-r-- 1 oskar oskar   42 wrz 21 16:23 main.less
root@mainPC2:/home/oskar/WORK/__MY/_v10/less# lessc main.less > main.css
/usr/bin/env: node: Nie ma takiego pliku ani katalogu

I had install nodejs (the the newest version)

root@mainPC2:/home/oskar/WORK/__MY/_v10/less# sudo apt-get install nodejs
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności       
Odczyt informacji o stanie... Gotowe
nodejs jest już w najnowszej wersji.
nodejs zaznaczony jako zainstalowany ręcznie.
0 aktualizowanych, 0 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.

and did npm install -g less at the beginning

root@mainPC2:/home/oskar# sudo npm install -g less
npm http GET https://registry.npmjs.org/less
npm http 304 https://registry.npmjs.org/less
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/source-map
npm http GET https://registry.npmjs.org/clean-css
npm http GET https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/clean-css
npm http 304 https://registry.npmjs.org/source-map
npm http 304 https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/minimist/0.0.8
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/json-stringify-safe
npm http GET https://registry.npmjs.org/mime-types
npm http GET https://registry.npmjs.org/forever-agent
npm http GET https://registry.npmjs.org/node-uuid
npm http GET https://registry.npmjs.org/tough-cookie
npm http GET https://registry.npmjs.org/form-data
npm http GET https://registry.npmjs.org/tunnel-agent
npm http GET https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/oauth-sign
npm http GET https://registry.npmjs.org/hawk/1.1.1
npm http GET https://registry.npmjs.org/aws-sign2
npm http GET https://registry.npmjs.org/stringstream
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/amdefine
npm http 304 https://registry.npmjs.org/minimist/0.0.8
npm http 304 https://registry.npmjs.org/forever-agent
npm http 304 https://registry.npmjs.org/mime-types
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/json-stringify-safe
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/tough-cookie
npm http 304 https://registry.npmjs.org/form-data
npm http 304 https://registry.npmjs.org/tunnel-agent
npm http 304 https://registry.npmjs.org/oauth-sign
npm http 304 https://registry.npmjs.org/http-signature
npm http 304 https://registry.npmjs.org/hawk/1.1.1
npm http 304 https://registry.npmjs.org/aws-sign2
npm http 304 https://registry.npmjs.org/stringstream
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/amdefine
npm http GET https://registry.npmjs.org/combined-stream
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/asn1/0.1.11
npm http GET https://registry.npmjs.org/assert-plus/0.1.2
npm http GET https://registry.npmjs.org/ctype/0.5.2
npm http 304 https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/punycode
npm http 304 https://registry.npmjs.org/asn1/0.1.11
npm http 304 https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/sntp
npm http GET https://registry.npmjs.org/hoek
npm http GET https://registry.npmjs.org/cryptiles
npm http GET https://registry.npmjs.org/boom
npm http GET https://registry.npmjs.org/delayed-stream/0.0.5
npm http 304 https://registry.npmjs.org/punycode
npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5
npm http 304 https://registry.npmjs.org/hoek
npm http 304 https://registry.npmjs.org/cryptiles
npm http 304 https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/sntp
/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], [email protected], [email protected], [email protected], [email protected])

I will be grateful for any help, thanks

6
  • Do you have node installed on the system? Did you install Less? What happens when you do (on command line) lessc MAIN.less > main.css
    – yuvi
    Sep 21, 2014 at 14:35
  • root@mainPC2:/home/oskar/WORK/__MY/_v10/less# pwd /home/oskar/WORK/__MY/_v10/less root@mainPC2:/home/oskar/WORK/__MY/_v10/less# ls -la razem 12 drwxrwxr-x 2 oskar oskar 4096 wrz 21 15:05 . drwxrwxr-x 4 oskar oskar 4096 wrz 21 15:06 .. -rw-rw-r-- 1 oskar oskar 42 wrz 21 16:23 main.less root@mainPC2:/home/oskar/WORK/__MY/_v10/less# lessc main.less > main.css /usr/bin/env: node: Nie ma takiego pliku ani katalogu so it is exactly the same. but commondline say my "less is the newest version" when I typing apt-get install less Sep 21, 2014 at 14:40
  • 1
    @OskarKosowski less is a different command, not related to CSS or node. Try sudo apt-get install nodejs. Also, please do not post command output in comments. Edit the question to add it.
    – muru
    Sep 21, 2014 at 14:45
  • After you install node correctly, do sudo npm install -g less
    – yuvi
    Sep 21, 2014 at 14:59
  • 2
    I think the problem is that the Ubuntu package names the node program nodejs instead of node. Try sudo ln -s $(which nodejs) /usr/local/bin/node
    – muru
    Sep 21, 2014 at 15:13

1 Answer 1

3

Renaming the nodejs command to node:

sudo ln -s $(which nodejs) /usr/local/bin/node

resolved the problem in command line, after which I reinstalled Sublime. After this everything work fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .