Error trying to run the webpack watcher

Trying to run the webpack watcher as shown in indico installation guidance (topic Running Indico), we stuck into the following error:

    (env) [root@IndicoProd01:~/dev/indico/src]# ./bin/maintenance/build-assets.py indico --dev --watch
    Traceback (most recent call last):
      File "./bin/maintenance/build-assets.py", line 273, in <module>
        cli()
      File "/root/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 764, in __call__
        return self.main(*args, **kwargs)
      File "/root/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 717, in main
        rv = self.invoke(ctx)
      File "/root/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 "/root/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 956, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/root/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 181, 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

Have you ever had that problem, guys ? How could get this fixed, please?

Thanks a lot!

Is npx in your PATH? Which nodejs version do you have installed?

Node version: v6.16.0

Regarding npx path, is this documented anywhere ? Could you please explain me it better ?
What’s the step-by-step to add it to my environment variables ?

Thx

That’s a pretty ancient version. Install a recent one and you’ll have npm and npx included and everything will work.

Check https://github.com/nodesource/distributions/blob/master/README.md and install node 10 :slight_smile: