Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run example through docker Quickstart #744

Closed
znaeem opened this issue Apr 2, 2022 · 4 comments · Fixed by #749
Closed

Cannot run example through docker Quickstart #744

znaeem opened this issue Apr 2, 2022 · 4 comments · Fixed by #749
Assignees

Comments

@znaeem
Copy link

znaeem commented Apr 2, 2022

I was not able to get the Mephisto project running on my machine. Particularly I cannot get the static_test_script.py to run, in the "Running your first task" guide , however the command mephisto check returns Mephisto seems to be set up correctly. I then tried to run it with docker, as did my colleague, and came across the same error, which is the following:

ERROR in ./dev/app.jsx 25:0-58
Module not found: Error: Can't resolve 'mephisto-task' in '/mephisto/mephisto/abstractions/blueprints/static_html_task/source/dev'
resolve 'mephisto-task' in '/mephisto/mephisto/abstractions/blueprints/static_html_task/source/dev'
  Parsed request is a module
  using description file: /mephisto/mephisto/abstractions/blueprints/static_html_task/source/package.json (relative path: ./dev)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      /mephisto/mephisto/abstractions/blueprints/static_html_task/source/dev/node_modules doesn't exist or is not a directory
      looking for modules in /mephisto/mephisto/abstractions/blueprints/static_html_task/source/node_modules
        single file module
          using description file: /mephisto/mephisto/abstractions/blueprints/static_html_task/source/package.json (relative path: ./node_modules/mephisto-task)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /mephisto/mephisto/abstractions/blueprints/static_html_task/source/node_modules/mephisto-task doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /mephisto/mephisto/abstractions/blueprints/static_html_task/source/node_modules/mephisto-task.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /mephisto/mephisto/abstractions/blueprints/static_html_task/source/node_modules/mephisto-task.json doesn't exist
            .wasm
              Field 'browser' doesn't contain a valid alias configuration
              /mephisto/mephisto/abstractions/blueprints/static_html_task/source/node_modules/mephisto-task.wasm doesn't exist
        /mephisto/mephisto/abstractions/blueprints/static_html_task/source/node_modules/mephisto-task doesn't exist
      /mephisto/mephisto/abstractions/blueprints/static_html_task/node_modules doesn't exist or is not a directory
      /mephisto/mephisto/abstractions/blueprints/node_modules doesn't exist or is not a directory
      /mephisto/mephisto/abstractions/node_modules doesn't exist or is not a directory
      /mephisto/mephisto/node_modules doesn't exist or is not a directory
      /mephisto/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
 @ ./dev/main.js 6:0-19

webpack 5.70.0 compiled with 1 error in 8117 ms
[2022-04-02 20:15:01,625][mephisto.operations.operator][ERROR] - Encountered error while launching run, shutting down
Traceback (most recent call last):
  File "/mephisto/mephisto/operations/operator.py", line 285, in launch_task_run_or_die
    built_dir = live_run.architect.prepare()
  File "/mephisto/mephisto/abstractions/architects/local_architect.py", line 134, in prepare
    self.server_dir = build_router(
  File "/mephisto/mephisto/abstractions/architects/router/build_router.py", line 114, in build_router
    task_builder.build_in_dir(local_server_directory_path)
  File "/mephisto/mephisto/abstractions/blueprints/static_html_task/static_html_task_builder.py", line 62, in build_in_dir
    self.rebuild_core()
  File "/mephisto/mephisto/abstractions/blueprints/static_html_task/static_html_task_builder.py", line 52, in rebuild_core
    raise Exception(
Exception: Webpack appears to have failed to build your frontend. See the above error for more information.
[2022-04-02 20:15:01,630][mephisto.operations.operator][ERROR] - Could not shut down architect: shutdown called before deploy
Traceback (most recent call last):
  File "/mephisto/mephisto/operations/operator.py", line 285, in launch_task_run_or_die
    built_dir = live_run.architect.prepare()
  File "/mephisto/mephisto/abstractions/architects/local_architect.py", line 134, in prepare
    self.server_dir = build_router(
  File "/mephisto/mephisto/abstractions/architects/router/build_router.py", line 114, in build_router
    task_builder.build_in_dir(local_server_directory_path)
  File "/mephisto/mephisto/abstractions/blueprints/static_html_task/static_html_task_builder.py", line 62, in build_in_dir
    self.rebuild_core()
  File "/mephisto/mephisto/abstractions/blueprints/static_html_task/static_html_task_builder.py", line 52, in rebuild_core
    raise Exception(
Exception: Webpack appears to have failed to build your frontend. See the above error for more information.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mephisto/mephisto/operations/operator.py", line 304, in launch_task_run_or_die
    live_run.architect.shutdown()
  File "/mephisto/mephisto/abstractions/architects/local_architect.py", line 190, in shutdown
    assert self.running_dir is not None, "shutdown called before deploy"
AssertionError: shutdown called before deploy
[2022-04-02 20:15:01,631][mephisto.operations.operator][ERROR] - Ran into error while launching run: 
Traceback (most recent call last):
  File "/mephisto/mephisto/operations/operator.py", line 509, in launch_task_run
    return self.launch_task_run_or_die(
  File "/mephisto/mephisto/operations/operator.py", line 310, in launch_task_run_or_die
    raise e
  File "/mephisto/mephisto/operations/operator.py", line 285, in launch_task_run_or_die
    built_dir = live_run.architect.prepare()
  File "/mephisto/mephisto/abstractions/architects/local_architect.py", line 134, in prepare
    self.server_dir = build_router(
  File "/mephisto/mephisto/abstractions/architects/router/build_router.py", line 114, in build_router
    task_builder.build_in_dir(local_server_directory_path)
  File "/mephisto/mephisto/abstractions/blueprints/static_html_task/static_html_task_builder.py", line 62, in build_in_dir
    self.rebuild_core()
  File "/mephisto/mephisto/abstractions/blueprints/static_html_task/static_html_task_builder.py", line 52, in rebuild_core
    raise Exception(
Exception: Webpack appears to have failed to build your frontend. See the above error for more information.
[2022-04-02 20:15:01,634][mephisto.operations.operator][INFO] - operator shutting down
@pringshia
Copy link
Contributor

pringshia commented Apr 5, 2022

Thanks for reporting @znaeem, looking into this.

@pringshia
Copy link
Contributor

@znaeem - I'm having a hard time reproducing this.

  • Did you install via cloning down the repo and then running the Docker command?
  • Are you on the latest version of the repo? What do you get after running the following: git rev-parse --short HEAD

@pringshia
Copy link
Contributor

pringshia commented Apr 5, 2022

Ah I think I see the issue, it seems that we accidentally dropped a few dependencies in a recent vulnerability clean up. I'm working on putting up a PR for this now, apologies for any inconvenience.

In the meanwhile, you can also resolve with the following:

cd mephisto/abstractions/blueprints/static_html_task/source/package.json
npm install --save mephisto-task

@spxneo
Copy link

spxneo commented Mar 28, 2024

still getting this error, not sure why its such a struggle even after using docker (that is supposed to take care of all these dependency issue).


[webpack-cli] Failed to load '/mephisto/examples/form_composer_demo/webapp/webpack.config.review.js' config
[webpack-cli] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:387:5)
    at validateString (node:internal/validators:162:11)
    at Object.resolve (node:path:1098:7)
    at Object.<anonymous> (/mephisto/examples/form_composer_demo/webapp/webpack.config.review.js:25:33)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at require (node:internal/modules/cjs/helpers:119:18) {
  code: 'ERR_INVALID_ARG_TYPE'
}
[2024-03-28 21:25:45,607][mephisto.operations.operator][INFO] - operator shutting down
Error executing job with overrides: []
Traceback (most recent call last):
  File "/mephisto/mephisto/tools/scripts.py", line 110, in process_config_and_run_main
    raise e
  File "/mephisto/mephisto/tools/scripts.py", line 108, in process_config_and_run_main
    ret_val = script_func(operator, cfg)
  File "/mephisto/examples/form_composer_demo/run_task.py", line 19, in main
    _build_custom_bundles(cfg)
  File "/mephisto/examples/form_composer_demo/run_task.py", line 50, in _build_custom_bundles
    build_custom_bundle(
  File "/mephisto/mephisto/tools/scripts.py", line 294, in build_custom_bundle
    raise Exception(
Exception: Webpack appears to have failed to build your frontend. See the above error for more information.

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants