SAO 6.2 Unable to build dist

I’m trying to install sao 6.2 and encounter multiples problems:

git clone https://github.com/tryton/sao.git sao
git checkout 6.2
npm install --production --legacy-peer-deps
grunt

Gives me a missing dependency:

>> Local Npm module "grunt-po2json" not found. Is it installed?

Running "default" task
Warning: Task "po2json" not found. Use --force to continue.

Aborted due to warnings.

I then install it with npm install po2json and test grunt again. But then there is a problem in less with a missing file:


Running "less:dev" (less) task
>> src/offcanvas.less: [L3:C0] 'variables' wasn't found. Tried - src/variables.less,src/variables.less,bower_components/variables.less,bower_components/bootstrap/variables.less,bower_components/bootstrap/less/variables.less,bower_components/bootstrap-rtl-ondemand/less/variables.less,npm://variables,npm://variables.less,variables.less
Warning: Error compiling src/sao.less Use --force to continue.

Aborted due to warnings.

So I rename the files sao-variables.less to variables.less which is the named used in multiples files and adapt sao.less accordingly. I then try again but still no success:

Running "less:dev" (less) task
>> src/sao.less: [L4:C0] 'bootstrap-rtl' wasn't found. Tried - src/bootstrap-rtl.less,src/bootstrap-rtl.less,bower_components/bootstrap-rtl.less,bower_components/bootstrap/bootstrap-rtl.less,bower_components/bootstrap/less/bootstrap-rtl.less,bower_components/bootstrap-rtl-ondemand/less/bootstrap-rtl.less,npm://bootstrap-rtl,npm://bootstrap-rtl.less,bootstrap-rtl.less
Warning: Error compiling src/sao.less Use --force to continue.

Aborted due to warnings.

Looks likes there is few more dependencies missing or do I miss something?

The production is only when you deploy using the released package which does not require to run grunt.
If you build from the source, you must remove the production option to get the development dependencies.

Ok thanks for your answer.
I had a working SAO from wget https://downloads.tryton.org/6.2/tryton-sao-last.tgz

but I had to run npx bower install manually after npm install --legacy-peer-deps.

I had these warnings:

I don't understand why postinstall doen't works, but I have a working SAO 6.2.
npm WARN lifecycle tryton-sao@6.2.8~postinstall: cannot run in wd tryton-sao@6.2.8 npx bower install (wd=/root/tryton/sao_6.2)
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN grunt-xgettext@0.3.5 requires a peer of grunt@~0.4.5 but none is installed. You must install peer dependencies yourself.
npm WARN grunt-po2json@0.3.0 requires a peer of grunt@~0.4.1 but none is installed. You must install peer dependencies yourself.