{"record":{"id":"c5b2314e6f171caf","repo":"pbakaus/impeccable","slug":"live-browser-script-part-missing-part-name","errorCode":null,"errorMessage":"Live browser script part missing: ${part.name} (${part.path})","messagePattern":"Live browser script part missing: (.+?) \\((.+?)\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"skill/scripts/live/browser-script-parts.mjs","lineNumber":24,"sourceCode":"export const LIVE_BROWSER_SCRIPT_PARTS = Object.freeze([\n  Object.freeze({ name: 'session-state', file: 'live-browser-session.js' }),\n  Object.freeze({ name: 'dom-helpers', file: 'live-browser-dom.js' }),\n  Object.freeze({ name: 'browser-ui', file: 'live-browser.js' }),\n]);\n\nexport function resolveLiveBrowserScriptParts(scriptsDir, parts = LIVE_BROWSER_SCRIPT_PARTS) {\n  if (!scriptsDir) throw new Error('scriptsDir is required');\n  return parts.map((part, index) => ({\n    ...part,\n    index,\n    path: path.join(scriptsDir, part.file),\n  }));\n}\n\nexport function assertLiveBrowserScriptParts(parts, exists = fs.existsSync) {\n  for (const part of parts) {\n    if (!exists(part.path)) {\n      throw new Error(`Live browser script part missing: ${part.name} (${part.path})`);\n    }\n  }\n  return parts;\n}\n\nexport function readLiveBrowserScriptParts(parts, readFile = (filePath) => fs.readFileSync(filePath, 'utf-8')) {\n  return parts.map((part) => ({\n    ...part,\n    source: readFile(part.path),\n  }));\n}\n\nexport function assembleLiveBrowserScript({\n  token,\n  port,\n  vocabulary,\n  commandPrefix = '/',\n  appRoot = null,","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/pbakaus/impeccable/blob/f88b2837a7d7c3182e46307bbbb091a1ed547571/skill/scripts/live/browser-script-parts.mjs#L6-L42","documentation":"Before the live server assembles its injected browser bundle, assertLiveBrowserScriptParts() (skill/scripts/live/browser-script-parts.mjs) verifies that every frozen part exists on disk: session-state (live-browser-session.js), dom-helpers (live-browser-dom.js), and browser-ui (live-browser.js), joined under the supplied scriptsDir. The first missing file throws with its part name and full path. (A falsy scriptsDir fails earlier in resolveLiveBrowserScriptParts with 'scriptsDir is required'.)","triggerScenarios":"Booting the live server (or calling assembleLiveBrowserScript via resolve+assert) with a scriptsDir that lacks one of the three part files — a partial skill install, a stale dist/ from before the bundle was split into parts, or an embedder passing a custom scriptsDir that only contains some files.","commonSituations":"Updating the skill but keeping the old scripts directory (new server expects parts the old tree doesn't have); submodule/npx installs that didn't materialize every file; running from a source checkout without building; a copied .claude/skills/impeccable/scripts that was trimmed.","solutions":["Look at the exact path in the error message and restore that file","Refresh the whole impeccable skill install (or, in the repo, re-run bun run build / bun run build:release) so scripts/ ships all three parts from one version","If embedding with a custom scriptsDir, copy live-browser-session.js, live-browser-dom.js, and live-browser.js into it","Never mix helper versions: the parts list is frozen per release and must match the assembling server"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import fs from 'node:fs';\nimport {\n  resolveLiveBrowserScriptParts,\n} from './live/browser-script-parts.mjs';\n\nconst parts = resolveLiveBrowserScriptParts(scriptsDir);\nconst missing = parts.filter((p) => !fs.existsSync(p.path)).map((p) => p.path);\nif (missing.length) {\n  throw new Error(`incomplete skill install — missing: ${missing.join(', ')}`);\n}\n// Safe to assertLiveBrowserScriptParts(parts) and assemble now.","typeGuard":null,"tryCatchPattern":"try {\n  assertLiveBrowserScriptParts(parts);\n} catch (err) {\n  if (err?.message?.startsWith('Live browser script part missing:')) {\n    // Install-level defect: refresh the skill/scripts dir; do not continue boot.\n    failFastWithReinstallHint(err.message);\n  }\n  throw err;\n}","preventionTips":["Install or update the impeccable skill as a unit — never cherry-pick files out of scripts/","After updates, verify the three part files exist in the scripts dir the server resolves","In the repo, run the build after pulling so generated trees stay consistent with sources"],"tags":["install","file-not-found","browser","live-server"],"backgroundTag":"file-not-found","analyzedSha":"f88b2837a7d7c3182e46307bbbb091a1ed547571","analyzedAt":"2026-08-18T04:58:36.608Z","contentChangedAt":"2026-08-18T04:58:36.608Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}