deepseek-ai/deepseek-harness · error
web-app: frontend dist not built; run pnpm run build from th
Error message
web-app: frontend dist not built; run pnpm run build from the repository root first
What it means
The web-app bundle serves the prebuilt GUI by resolving @deepseek-ai/dsh-web-frontend/dist/index.html through package exports (resolveDistIndex). When resolution fails — a source checkout where the frontend dist has not been generated — it throws this build-order error. The dist is a build artifact, not checked in, so the message names the canonical remedy: a root build.
Source
Thrown at packages/bundle/web-app/src/index.ts:169
+ 'The apps/web Vite entry builds the shell but is not a standalone application because only dsh web injects window.__DSH_BOOT__. '
+ 'Do not start a replacement server unless the user asks; if one is needed, use a managed background job and verify its exact URL.'
}
/** Resolve the canonical loopback URL from the active Web server. */
function localWebUrl(ctx: Context): string {
const port = ctx.get('webServer')?.port
if (port === undefined) throw new Error('web-app: webServer service missing while resolving Web runtime')
return `http://${LOOPBACK_HOST}:${String(port)}`
}
/** Dist location is workspace knowledge of this bundle: resolved through the frontend package exports, not configured. */
function resolveDistIndex(): string {
const require = createRequire(import.meta.url)
try {
return require.resolve('@deepseek-ai/dsh-web-frontend/dist/index.html')
} catch {
/* v8 ignore next 2 -- reachable only on a checkout without a built dist; the test tree builds it */
throw new Error('web-app: frontend dist not built; run pnpm run build from the repository root first')
}
}
/** Start the maintained platform opener without forwarding Harness credentials. */
function spawnBrowserLauncher(url: string): ChildProcess {
return spawn(process.execPath, [
'--input-type=module',
'--eval', BROWSER_OPENER_PROGRAM,
'--', url,
], {
env: scrubbedParentEnv(),
stdio: ['ignore', 'inherit', 'pipe'],
})
}
/** Hand one URL to the operating system's default browser. */
async function openBrowser(url: string): Promise<void> {
const launcher = spawnBrowserLauncher(url)View on GitHub (pinned to b150a551b8)
Solutions
- Run pnpm run build from the repository root to build all workspace artifacts, including the web frontend dist
- For a faster path, build just the frontend workspace: pnpm --filter @deepseek-ai/dsh-web-frontend build
- Confirm dist/index.html now exists under the frontend package and that its exports map resolves
Example fix
# before pnpm install && pnpm dsh web # → web-app: frontend dist not built # after pnpm install && pnpm run build && pnpm dsh web
Defensive patterns
Strategy: validation
Validate before calling
import { createRequire } from 'node:module'
function frontendDistBuilt(): boolean {
try {
createRequire(import.meta.url).resolve('@deepseek-ai/dsh-web-frontend/dist/index.html')
return true
} catch {
return false
}
}
if (!frontendDistBuilt()) {
throw new Error('run pnpm run build from the repository root before starting the web app')
} Prevention
- Run pnpm run build once after install and after pnpm run clean, before launching dsh web
- In Docker/CI, make the build a fixed step so the dist exists at runtime
- Wrap launches in an install → build → run script
When it happens
Trigger: Running dsh web from a fresh clone or after pnpm run clean without running pnpm run build first, so no dist/index.html exists for require.resolve to find.
Common situations: Fresh clone: pnpm install then immediately dsh web; CI or container images that install but skip the build step; artifacts removed between runs.
Related errors
- client-modules: ${String(failures.length)} client ${packageN
- client-modules: client bundle not found; run `pnpm run build
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/ecf52920ba21211a.
Report an issue: GitHub.