Compile-catalog-react

Hello there,
I installed indico 2.2, it works fine. Then I added Ukrainian translation from transiflex. To activate it, I ran indico i18n compile-catalog as suggested. Later I noticed that some messages are still not translated, and found that for 2.2, I also need indico i18n compile-catalog-react.
However, I got the following error message:

indico@vo-vivobook:~$ indico i18n compile-catalog-react
Traceback (most recent call last):
  File "/opt/indico/.venv/bin/indico", line 10, in <module>
    sys.exit(cli())
  File "/opt/indico/.venv/local/lib/python2.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/opt/indico/.venv/local/lib/python2.7/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/opt/indico/.venv/local/lib/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/opt/indico/.venv/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/cli/util.py", line 110, in invoke
    return self._impl.invoke(ctx)
  File "/opt/indico/.venv/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/indico/.venv/local/lib/python2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/indico/.venv/local/lib/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/cli/i18n.py", line 157, in compile_catalog_react
    output = subprocess.check_output(['npx', 'react-jsx-i18n', 'compile', po_file])
  File "/usr/lib/python2.7/subprocess.py", line 216, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Any help?

You cannot run this tool on a production setup; the command requires a dev setup.

After running it, you can then build your own Indico python wheel using ./bin/maintenance/build-wheel.py indico --add-version-suffix and install it on your production system.

Thanks! It worked, however I had to upgrade npm to version 10, since default Ubuntu 18.04 install of npm produced error.
I just compiled messages-react.json on my dev setup and copied it to the production system, cleared cache and touched indico.wsgi, and now all works fine.