Odoo Installation on Mac Could Not Execute Command LESSC

一世执手 提交于 2019-11-29 08:54:37

Looking at the stack trace of the error message you posted, you are missing the pyPdf package (unrelated to the database).

This could be generating some loading issues.

Run

pip install pyPdf

and check if the problem still persists. If so, post the stack trace.

I seems it was a node/npm issue. I had installed the node.js package which brings npm. I googled and found that there were issues if npm was installed without first removing an older version of it?

https://gist.github.com/DanHerbert/9520689

Somewhere I found this command:

sudo rm -rf /usr/local/lib/node_modules/npm

I removed npm and then reinstalled but this time I installed node from brew:

brew install node

Then I was able to follow the section here on lessc error and Odoo seems to be running fine:

http://jingigirl.blogspot.com/2015/10/install-odoo-90-on-mac.html

In this post it states that one must instal less and then less-plugin-clean-css and finally upgrade node which in my case wasnt necessary because I already had node 5.10.0.

What led me to the issue was that even after installing the node.js from nodejs.org, when I entered node -v I received an error node not installed!

Lessc install

This error occurs almost every time with a fresh installation of Odoo. (Especially with Ubuntu 12.04)

  1. First run these three commands in your terminal.
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
  1. Then you install nodejs:
sudo apt-get install nodejs
  1. You can then check version of nodejs using:
node -v
  1. It should be at least greater than > 0.10
npm -v

Should return a version at least > 1.4

  1. 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

pypdf for the second error

sudo apt-get update
sudo apt-get install python-pypdf
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!