open-rmf / rmf-web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dashboard launching error

aaronchongth opened this issue · comments

Bug report

Required information:

  • Operating system and version:
    • Ubuntu 20.04
  • OpenRMF installation type:
    • source
  • OpenRMF version or commit hash
  • ROS distribution and version:
    • galactic
  • ROS installation type:
    • binaries
  • Package or library, if applicable:
    • dashboard and related to api-client

Description of the bug

Error when starting dashboard,

Failed to compile.

./src/components/rmf-app/rmf-ingress.ts
Module not found: Can't resolve 'api-client' in '/home/aaron/workspaces/rmf_main/rmf-web/packages/dashboard/src/components/rmf-app'

Steps to reproduce the bug

source rmf_ws/install/setup.bash
cd rmf-web
./script/bootstrap.sh

cd packages/dashboard
npm run start:react

Additional information

There were some internal discussions regarding this issue on Slack already, hopefully we can track the patches and fixes along the way here.

Current workaround, mentioned by @cnboonhan,

source rmf_ws/install/setup.bash
cd rmf-web/packages/dashboard
npm run build

Once the compilation has completed successfully,

npm run start-react

The dashboard launches fine now

As for working with prototype/task_v2-2 there were similar issues when starting the dashboard, the current workaround seems to be,

cd rmf-web
git checkout 8aecc89    # this is the hash for a few commits before the tip of prototype/task_v2-2

source ~/rmf_ws/install/setup.bash
./script/boostrap.sh

cd packages/dashboard
npm run build
npm run start:react

Thats expected as start:react does not automatically build the dependencies. Dependency resolution only works at the package level, so we can only add the build command to the main start script.

Thanks for the explanation! Closing as resolved.