Skip to content

fix(dashboard): install node dependencies before building - #6

Open
tonydzi wants to merge 1 commit into
LambdaLabsML:mainfrom
tonydzi:fix/dashboard-build-installs-deps
Open

tonydzi wants to merge 1 commit into
LambdaLabsML:mainfrom
tonydzi:fix/dashboard-build-installs-deps

Conversation

@tonydzi

@tonydzi tonydzi commented Sep 21, 2026

Copy link
Copy Markdown

What breaks

The README's from-source path is:

git clone https://github.com/LambdaLabsML/the_lab.api.git
cd the_lab.api
pip install -e .
./build-dashboard.sh

On a fresh clone the last step fails immediately, because the script calls npm run build without ever installing the dashboard's dependencies:

> build
> vite build

'vite' is not recognized as an internal or external command,
operable program or batch file.

set -e stops there, nothing is built, and the-lab . keeps serving the "dashboard not built" page — which reads like a packaging problem rather than a missing npm ci.

The fix

Install first when node_modules/.bin/vite is absent: npm ci when package-lock.json is present (it is), npm install otherwise. Repeat runs are unchanged — the check is a no-op once deps exist.

Evidence

Clean tree (node_modules moved aside), same machine, Node 24.17:

result
before exit 1, 'vite' is not recognized, the_lab/static untouched
after ✓ built in 5.85s → Built: index-C76cyvdh.js index-BCMOE9h2.css, dashboard live on the running server

Context

Found while setting The Lab up on Windows 11 and running a real four-idea experiment loop on optimization/test_project (composite score 0.0657 → 1.6587). The API and the worktree isolation worked out of the box; this was the one step in the documented install that needed a manual command.

— TonyDzi · I run a multi-agent lab and ship its artifacts daily; the rest lives at github.com/tonydzi — DMs open.

The README's from-source path is `git clone` → `pip install -e .` →
`./build-dashboard.sh`, but the script goes straight to `npm run build`. A
fresh clone has no node_modules, so the build stops at

    > vite build
    'vite' is not recognized as an internal or external command

and the server keeps serving the "dashboard not built" page. Running
`npm ci` by hand first is what actually makes it work, so the script now does
that itself when node_modules has no vite binary (`npm install` when there is
no lockfile).

Verified on a clean tree: with node_modules moved aside the old script fails
as above; the patched script installs and finishes with "Built:
index-*.js index-*.css", and the running server picks the build up.

Assisted-by: Claude Code / claude-opus-5
Machine: A-2022BAYAREA
Account: tonydzi
Operator: anton
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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