Error compiling javascript and assets on startup (Installation)

when starting Indico, you need to run the following command

./bin/maintenance/build-assets.py indico --dev --watch

as you can see, i get an error when running this

Python version 2.7.5

Any ideas please?

(env) [indico@centos src]$ ./bin/maintenance/build-assets.py indico --dev --watch
Traceback (most recent call last):
  File "./bin/maintenance/build-assets.py", line 270, in <module>
    cli()
  File "/home/indico/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/indico/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/indico/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/indico/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/indico/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "./bin/maintenance/build-assets.py", line 180, in build_indico
    subprocess.check_call(['npx', 'webpack'] + args)
  File "/usr/lib64/python2.7/subprocess.py", line 537, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 524, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Make sure you have a recent version of node and npm installed on your system. In that case, npx should be available in your $PATH. The error you are getting indicates that it’s not available at the moment.

thanks.

Ok - checked and reinstalled node and num, also added npx to path, now getting further error on rerun of code

(env) [indico@centos src]$ pwd

/home/indico/dev/indico/src

(env) [indico@centos src]$ export PATH=/usr/bin/npx:$PATH

(env) [indico@centos src]$ echo $PATH

/usr/bin/npx:/home/indico/dev/indico/env/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/indico/.local/bin:/home/indico/bin

(env) [indico@centos src]$ ./bin/maintenance/build-assets.py indico --dev --watch

Object.entries is not a function

Error: running webpack failed

(env) [indico@centos src]$

Sounds like you have a very old node version, possibly the one that’s in your distribution’s package manager.

Please see https://github.com/nodesource/distributions/blob/master/README.md on how to install a recent version from the official node repos.

ok - will try that and try to rerun - thanks - will let you know how i get on…