Skip to content

fix(ui): add missing prestart script to auto-generate config in production mode#123

Open
wushengjie wants to merge 1 commit into
OpenBMB:mainfrom
wushengjie:fix-start-script-bug
Open

fix(ui): add missing prestart script to auto-generate config in production mode#123
wushengjie wants to merge 1 commit into
OpenBMB:mainfrom
wushengjie:fix-start-script-bug

Conversation

@wushengjie
Copy link
Copy Markdown

Describe the bug
Running npm run start in a fresh environment fails with a fatal error: Config must contain an agent section..
This happens because start mode is missing the initialization hook (bootstrap-pilotdeck-config.mjs) that generates the initial ~/.pilotdeck/pilotdeck.yaml file, which is present in dev mode (predev).

To Reproduce

  1. Clone the repo in a fresh environment (without ~/.pilotdeck/pilotdeck.yaml).
  2. Run cd ui && npm run start.
  3. Gateway crashes due to missing config.

Solution
Added a prestart hook in ui/package.json matching the existing predev hook, ensuring the bootstrap-pilotdeck-config.mjs script runs before starting the production server, fixing the OOTB experience.

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 this pull request may close these issues.

1 participant