CERT-Polska/mwdb-core

Error during configuring web

Closed this issue · 1 comments

Environment information

  • MWDB version (from /about): 2.13.0
  • Installation method:
    • mwdb.cert.pl service
    • From PyPi (pip install mwdb-core)
    • From docker-compose
    • Other (please explain)
  • Plugins installed: fresh installation without any plugins

Behaviour the bug (what happened?)

After uncommenting string web_folder = ./web in the mwdb I received following error:

mwdb-core configure web
INFO  [mwdb.configure] Creating build context...
Traceback (most recent call last):
  File "/home/user/venv/bin/mwdb-core", line 8, in <module>
    sys.exit(cli())
  File "/home/user/venv/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/user/venv/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/user/venv/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/user/venv/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/user/venv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/user/venv/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/user/venv/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/user/venv/lib/python3.10/site-packages/mwdb/cli/cli.py", line 121, in configure_web
    npm_build_web(target_dir)
  File "/home/user/venv/lib/python3.10/site-packages/mwdb/cli/web.py", line 42, in npm_build_web
    raise RuntimeError(
RuntimeError: Critical error: expected file ./config-overrides.js doesn't exist

I couldn't find any specific instructions on config-overrides.js in the documentation.

Additional context

Standalone installation, Ubuntu 22.04, nodejs and npm are installed.

It's regression after moving to Vite (#741)

This file is no longer expected to exist and should not be a part of the expected files list: https://github.com/CERT-Polska/mwdb-core/blob/master/mwdb/cli/web.py#L26.

Thanks for the report, I'll make a bugfix soon.