Help

9

What does this error mean on Odoo? "Could not execute command 'lessc'"

Avatar
Timo Goosen

I keep getting this error on Odoo in the top left corner of the screen when I use the website builder:

"Could not execute command 'lessc'"

Avatar
Discard
11 Answers
35
Avatar
Luigi Gregori
Best Answer

 

Try login as root ( or use sudo) and run 

apt-get install node-less

It worked well for me.

LG

8 Comments
Avatar
Discard
Avatar
Fnordbedarf
-

Did you mean "sudo apt-get install node-less" ?

Avatar
Luigi Gregori
-

Yes, sorry for type mismatch :-(

Avatar
August Doo
-

This works for me too

Avatar
Vadims Briksins
-

didnt helped, but after I installed blog addon as it was suggested bellow and it worked out.

Avatar
Dasadiya Chaitanya
-

@ALL I had done the above all the things but it can not solve my Error ..

Avatar
Gregory Dover
-

This works for me too.

Avatar
Tomás Pascual
-

This works for me too

Avatar
Hanish Mangalasseri
-

this works for me also

21
Avatar
Axel Mendoza
Best Answer

The fix:

sudo apt-get install nodejs nodejs-legacy node-less
sudo apt-get install npm
sudo npm install -g less
sudo npm install -g less-plugin-clean-css
sudo ln -s /usr/local/bin/lessc /usr/bin/lessc
sudo ln -s /usr/bin/nodejs /usr/bin/node

After the fix you have 3 options (because a simply f5 to refresh or a server restart doesn't recompile your .less files):

1- Delete and/or Create a new Database

2- Install a module that add a new .less file to be compiled, like blog or website like was suggested here

3- Manually compile your .less files

3 Comments
Avatar
Discard
Avatar
Bruno PLANCHER
-

This solved the issue for me. The fix depends of the way we want to install it: - using 'node-less' with apt-get (this automatically set the executable available) - 'less' with npm (it creates an executable under its own directory, we have to make a symbolic link to the standard bin path to be usable) By the way, you don't need to install less globally, it only changes where the lessc executable is located

Avatar
Marcio Valenzuela
-

what if we are on a mac and dont have apt get?

Avatar
Axel Mendoza
-

use brew instead of apt-get

6
Avatar
Angelo
Best Answer

Hi, install a Blogs module for fix the bug.

2 Comments
Avatar
Discard
Avatar
Vadims Briksins
-

Thank you, it did helped me. (Was running odoo 9 Alpha v1 from source in PyCharm)

Thank you...

3

To all of you who are encountering this problem, it is due to a problem with an old version of nodejs (shows up especially in Ubuntu 12.04). To install a stable version we use Chris Lea's repo as follows:

  • sudo apt-get install python-software-properties

  • sudo apt-add-repository ppa:chris-lea/node.js

  • sudo apt-get update

Then you install nodejs:

sudo apt-get install nodejs

You can then check version of nodejs using:

node -v

It should be at least greater than > 0.10

npm -v

Should return a version at least > 1.4

Then finally execute the following command, whick will update npm to a newer version as well as install the less plugin:

  • sudo npm install -g npm

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

Enjoy, it worked for me after searching for long hours, enjoy, it worked for me after searching for long hours,

Mustafa

4 Comments
Avatar
Discard
Avatar
sengottuvel
-

I am also using 12.04 and I followed all the above steps. But still the Could not execute command 'lessc' error showing. I restarted server and postgres service. Deleted old db and created new one. Kinldy help to solve this.

Avatar
sengottuvel
-

my node.js version is v0.10.37 npm version is 3.5.2

Hello,

Yes this is a common issue with 12.04, please follow the following steps:

Please make sure you have the prerequisites in place for Odoo 8 on 12.04. You can refer to the following document http://www.serpentcs.com/serpentcs-openerp-v7-v8odoo-installation-ubuntu.

Then please follow following steps:

Then:


Then you install nodejs: 

  • sudo apt­get install ­y nodejs 

You can then check version of nodejs using: 
  • node ­v 
  • It should be at least greater than > 0.12
  • Also, npm ­v , should return a version at least > 2.0
 
Then finally execute the following command, whick will update npm to a
newer version as well as install the less plugin: 

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

In order for images to display correctly: 

  • sudo pip install ­­upgrade werkzeug

All the best,

Mustafa B. Hamad




On 1 January 2016 at 14:50, sengottuvel <sengottuvl-gmail-com@mail.odoo.com> wrote:

my node.js version is v0.10.37 npm version is 3.5.2

--
sengottuvel


Sorry some typos:

Then please follow following steps:

Then:


Then you install nodejs: 

  • sudo apt­-get install ­-y nodejs 

You can then check version of nodejs using: 
  • node -­v 
  • It should be at least greater than > 0.12
  • Also, npm -­v , should return a version at least > 2.0
 
Then finally execute the following command, whick will update npm to a
newer version as well as install the less plugin: 

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

In order for images to display correctly: 

  • sudo pip install --­­upgrade werkzeug

On 1 January 2016 at 15:22, Mustafa Hamad <mustafajava@gmail.com> wrote:
Hello,

Yes this is a common issue with 12.04, please follow the following steps:

Please make sure you have the prerequisites in place for Odoo 8 on 12.04. You can refer to the following document http://www.serpentcs.com/serpentcs-openerp-v7-v8odoo-installation-ubuntu.

Then please follow following steps:

Then:


Then you install nodejs: 

  • sudo apt­get install ­y nodejs 

You can then check version of nodejs using: 
  • node ­v 
  • It should be at least greater than > 0.12
  • Also, npm ­v , should return a version at least > 2.0
 
Then finally execute the following command, whick will update npm to a
newer version as well as install the less plugin: 

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

In order for images to display correctly: 

  • sudo pip install ­­upgrade werkzeug

All the best,

Mustafa B. Hamad




On 1 January 2016 at 14:50, sengottuvel <sengottuvl-gmail-com@mail.odoo.com> wrote:

my node.js version is v0.10.37 npm version is 3.5.2

--
sengottuvel



0
Avatar
Jérémy Kersten (jke)
Best Answer

First Time that You see it... It's because You don't have lessc installed!

Once installed, You need to invalidate the bundle (installing any module which add less file) to generate again the bundle! 

Avatar
Discard
0
Avatar
wizardz
Best Answer

It's not working here, What is with wkhtmltopdf?

1 Comment
Avatar
Discard
Avatar
wizardz
-

Ok now it's worked, I have installed node-less and then the Module: website builder

0
Avatar
Wassim Chaabouni
Best Answer

1- install node-less: apt-get install node-less

2- Restart postgresql service: sudo service postgresql restart

3- Restart the sever.

Avatar
Discard
0
Avatar
Hussainar
Best Answer

Try this

sudo apt-get install lxc

Avatar
Discard
0
Avatar
Gajanan Kathar
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 overcome this problem 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

1 Comment
Avatar
Discard
Avatar
Dasadiya Chaitanya
-

@Gajanan Kathar I had done the above all the things but it can not solve my Error ..

0
Avatar
ahmed hegazy
Best Answer

before install blog run this :

 apt-get -y update && apt-get -y upgrade && apt-get -y install python python-egenix-mxdatetime python-dateutil python-pybabel python-openid python-feedparser python-lxml python-libxml2 python-libxslt1 python-psycopg2 python-libxml2 python-libxslt1 python-imaging python-gdata python-ldap python-reportlab python-pyparsing python-simplejson python-pydot python-webdav graphviz python-werkzeug python-matplotlib python-vatnumber python-numpy python-pychart python-vobject python-zsi python-xlwt python-hippocanvas python-profiler python-dev python-setuptools postgresql postgresql-client-common python-yaml python-mako gcc mc python-babel python-feedparser python-reportlab-accel python-zsi python-openssl python-jinja2 python-unittest2 python-mock  python-docutils lptools make python-psutil python-paramiko poppler-utils python-pdftools antiword python-jinja2 python-requests git-core sudo python-decorator python-pypdf python-passlib xsltproc xmlstarlet python-soappy python-qrencode curl npm && curl -sL https://deb.nodesource.com/setup | bash - && apt-get -y install nodejs && npm install -g npm && npm install -g less less-plugin-clean-css

http://misnotasdelinux.blogspot.mx/2015/10/instalar-odoo-9-en-debian-8.html

1 Comment
Avatar
Discard

it worked for me. Thanks

-1
Avatar
Mariusz Mizgier
Best Answer
1 Comment
Avatar
Discard
Avatar
Fnordbedarf
-

I followed the instructions on the link. Not knowing where to put the path to lessc correctly, I installed less, globally as advised in the second post. sudo apt-get install npm sudo npm install lessc This breaks my Odoo's behavior: The Website does not load except for the black header bar at the top, which buttons do not perform a drop-down box.