{"record":{"id":"ecf52920ba21211a","repo":"deepseek-ai/deepseek-harness","slug":"web-app-frontend-dist-not-built-run-pnpm-run-bui","errorCode":null,"errorMessage":"web-app: frontend dist not built; run pnpm run build from the repository root first","messagePattern":"web-app: frontend dist not built; run pnpm run build from the repository root first","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/bundle/web-app/src/index.ts","lineNumber":169,"sourceCode":"    + 'The apps/web Vite entry builds the shell but is not a standalone application because only dsh web injects window.__DSH_BOOT__. '\n    + 'Do not start a replacement server unless the user asks; if one is needed, use a managed background job and verify its exact URL.'\n}\n\n/** Resolve the canonical loopback URL from the active Web server. */\nfunction localWebUrl(ctx: Context): string {\n  const port = ctx.get('webServer')?.port\n  if (port === undefined) throw new Error('web-app: webServer service missing while resolving Web runtime')\n  return `http://${LOOPBACK_HOST}:${String(port)}`\n}\n\n/** Dist location is workspace knowledge of this bundle: resolved through the frontend package exports, not configured. */\nfunction resolveDistIndex(): string {\n  const require = createRequire(import.meta.url)\n  try {\n    return require.resolve('@deepseek-ai/dsh-web-frontend/dist/index.html')\n  } catch {\n    /* v8 ignore next 2 -- reachable only on a checkout without a built dist; the test tree builds it */\n    throw new Error('web-app: frontend dist not built; run pnpm run build from the repository root first')\n  }\n}\n\n/** Start the maintained platform opener without forwarding Harness credentials. */\nfunction spawnBrowserLauncher(url: string): ChildProcess {\n  return spawn(process.execPath, [\n    '--input-type=module',\n    '--eval', BROWSER_OPENER_PROGRAM,\n    '--', url,\n  ], {\n    env: scrubbedParentEnv(),\n    stdio: ['ignore', 'inherit', 'pipe'],\n  })\n}\n\n/** Hand one URL to the operating system's default browser. */\nasync function openBrowser(url: string): Promise<void> {\n  const launcher = spawnBrowserLauncher(url)","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/bundle/web-app/src/index.ts#L151-L187","documentation":"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.","triggerScenarios":"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.","commonSituations":"Fresh clone: pnpm install then immediately dsh web; CI or container images that install but skip the build step; artifacts removed between runs.","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"],"exampleFix":"# before\npnpm install && pnpm dsh web   # → web-app: frontend dist not built\n\n# after\npnpm install && pnpm run build && pnpm dsh web","handlingStrategy":"validation","validationCode":"import { createRequire } from 'node:module'\n\nfunction frontendDistBuilt(): boolean {\n  try {\n    createRequire(import.meta.url).resolve('@deepseek-ai/dsh-web-frontend/dist/index.html')\n    return true\n  } catch {\n    return false\n  }\n}\n\nif (!frontendDistBuilt()) {\n  throw new Error('run pnpm run build from the repository root before starting the web app')\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["build","frontend","dist","setup"],"backgroundTag":"missing-build-artifact","analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}