{"record":{"id":"4a26b7f2267e8642","repo":"stablyai/orca","slug":"missing-entry-path-run-pnpm-run-build-electron-4a26b7","errorCode":null,"errorMessage":"Missing ${ENTRY_PATH}; run pnpm run build:electron-vite first","messagePattern":"Missing (.+?); run pnpm run build:electron-vite first","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/runtime-file-watcher-resource-probe.mjs","lineNumber":25,"sourceCode":"import { promisify } from 'node:util'\nimport { build } from 'esbuild'\n\nconst ENTRY_PATH = resolve('out/main/parcel-watcher-process-entry.js')\nconst POOL_SOURCE = resolve('src/main/ipc/runtime-watcher-process-pool.ts')\nconst FAILURE_SOURCE = resolve('src/main/ipc/parcel-watcher-process-failure.ts')\nconst REGISTRY_SOURCE = resolve('src/main/ipc/parcel-watcher-child-registry.ts')\nconst MAX_CHILD_RSS_KIB = 128 * 1024\nconst MAX_CHILD_CPU_PERCENT = 50\nconst MAX_QUARANTINE_RSS_KIB = 512 * 1024\nconst MAX_QUARANTINE_CPU_PERCENT = 100\nconst PHYSICAL_CHILD_CAP = 8\nconst WAIT_TIMEOUT_MS = 15_000\nconst execFileAsync = promisify(execFile)\nconst require = createRequire(import.meta.url)\n\nasync function main() {\n  if (!existsSync(ENTRY_PATH)) {\n    throw new Error(`Missing ${ENTRY_PATH}; run pnpm run build:electron-vite first`)\n  }\n\n  const createdRoots = []\n  const exactPids = new Set()\n  let bundleDir\n  let pool\n  let result\n  try {\n    bundleDir = await mkdtemp(join(tmpdir(), 'orca-runtime-watcher-resource-'))\n    const { RuntimeWatcherProcessPool, WatcherProcessFailure, reserveWatcherChild } =\n      await loadProbe(bundleDir)\n    const roots = []\n    for (let index = 0; index < 5; index++) {\n      const createdRoot = await mkdtemp(join(tmpdir(), `orca-watcher-resource-${index}-`))\n      createdRoots.push(createdRoot)\n      roots.push(await realpath(createdRoot))\n    }\n","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/runtime-file-watcher-resource-probe.mjs#L7-L43","documentation":"This verification/probe script requires the compiled Electron main bundle to exist at out/main/parcel-watcher-process-entry.js before it can exercise the runtime watcher process pool. The check is a hard precondition: without the built entry the script cannot load the RuntimeWatcherProcessPool/WatcherProcessFailure modules it needs to probe. The message names the exact build step (pnpm run build:electron-vite) that produces the artifact.","triggerScenarios":"Running config/scripts/runtime-file-watcher-resource-probe.mjs directly or via a CI target before the electron-vite main bundle has been emitted. Concretely existsSync('out/main/parcel-watcher-process-entry.js') returns false inside main() at line 24.","commonSituations":"Running the watcher resource probe in isolation on a fresh clone, after `git clean -fdx`, after switching branches that delete out/, or in a CI job whose matrix leg skips the build step. Also after changing the entry filename without updating ENTRY_PATH on line 10.","solutions":["Run `pnpm run build:electron-vite` from the repo root, then re-run the probe.","Confirm the entry filename still matches: grep for `parcel-watcher-process-entry` in the electron-vite config; if the build renames it, update ENTRY_PATH (line 10) to match.","If a prior build exists but out/ was cleaned, rerun the build; do not copy the entry in by hand."],"exampleFix":"// before: probe run against a clean tree\nnode config/scripts/runtime-file-watcher-resource-probe.mjs\n// after\npnpm run build:electron-vite && node config/scripts/runtime-file-watcher-resource-probe.mjs","handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs'\nimport { resolve } from 'node:path'\nconst ENTRY_PATH = resolve('out/main/parcel-watcher-process-entry.js')\nif (!existsSync(ENTRY_PATH)) {\n  console.error(`Build artifact missing. Run: pnpm run build:electron-vite`)\n  process.exit(1)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always run `pnpm run build:electron-vite` before invoking any config/scripts probe that loads from out/.","Wire the probe as a post-build step in the same npm script so the order is enforced.","If ENTRY_PATH changes, update the constant on line 10 in lockstep."],"tags":["build","electron","watcher","bundling","precondition"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}