Skip to Content
Menu
This question has been flagged
5 Replies
5360 Views

I did install all dependies as proposed in https://www.odoo.com/documentation/8.0/setup/install.html#source-install on my Ubuntu 14.4 server. After installing clean theme on a newly created database I see on the website that there must be a CSS error (no grafic, no structure).

The Logfile says:
IOError: [Errno 2] command not found: 'lessc'

When I check which less and which lessc the results are the same as odoo or as root user:

/usr/bin/less and /usr/local/bin/lessc

I think the problem is that odoo can't find lessc, but I don't have any idea how to fix this.
In my odoo home folder the .npm folder has been created.

Avatar
Discard
Author Best Answer

The solution in my question was relativly simple, but without the help of a friend I would have having problems to find the clue.

Because normally odoo is started from the root user, so the environment variable from the odoo user are not active. The  environment variables are coming from the process, eg are normally stated in the /etc/init.d/odoo-server startup file.

This variable should solve the problem:  Please ad or correct in the startup script.

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin 

 Another solution is the create a link to lessc folder

sudo ln -s /usr/local/bin/lessc /usr/bin/lessc


Avatar
Discard

Meanwhile I have found this way, which I believe is quite fool-proof. https://www.odoo.com/forum/help-1/question/ubuntu-server-14-04-howto-install-nodejs-npm-and-less-82575

Best Answer

error is for missing file "/usr/bin/less" for me this command worked.

sudo npm install -g less less-plugin-clean-css
Avatar
Discard
Best Answer

This error shows because of two reasons

  1. You don't install required packages and plug-ins on your ubuntu system or

  2. Install packages and plug-ins are outdated

To ride off from this issue try this commands on your ubuntu terminal

  • sudo apt-get install curl

  • curl -sL https://deb.nodesource.com/setup_0.10 | sudo bash -

  • sudo apt-get install -y nodejs

  • sudo npm install -g npm (to update npm)

  • sudo npm install -g less less-plugin-clean-css

Avatar
Discard
Best Answer

It took me weeks of desperation to overcome these problems...it's working fine now, but I don't know anymore how I did it exactly  :-(

Did you try vilder's suggestion in this issue: https://github.com/odoo/odoo/issues/4604 ?

Avatar
Discard