{"record":{"id":"ad39da6f709b01d9","repo":"stablyai/orca","slug":"cannot-build-the-validation-app-electron-vite-ent","errorCode":null,"errorMessage":"Cannot build the validation app: electron-vite entry not found at ${electronViteEntry}. Install dependencies (pnpm install) or pass --skip-build with a prebuilt out/main/index.js.","messagePattern":"Cannot build the validation app: electron-vite entry not found at (.+?)\\. Install dependencies \\(pnpm install\\) or pass --skip-build with a prebuilt out/main/index\\.js\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/run-codex-real-account-validation.mjs","lineNumber":334,"sourceCode":"  }\n  return options\n}\n\n// Why: `npx` resolves to a .cmd shim on Windows that execFileSync cannot launch\n// (ENOENT), so the harness could not build its own app there. Run the\n// repository-local electron-vite JS entry with the current Node binary instead;\n// process.execPath + a resolved .js path behaves identically on macOS, Linux,\n// and Windows without a shell.\nexport function resolveElectronViteBuildCommand(repoRoot) {\n  const electronViteEntry = path.join(\n    repoRoot,\n    'node_modules',\n    'electron-vite',\n    'bin',\n    'electron-vite.js'\n  )\n  if (!existsSync(electronViteEntry)) {\n    throw new Error(\n      `Cannot build the validation app: electron-vite entry not found at ${electronViteEntry}. ` +\n        'Install dependencies (pnpm install) or pass --skip-build with a prebuilt out/main/index.js.'\n    )\n  }\n  return { command: process.execPath, args: [electronViteEntry, 'build', '--mode', 'e2e'] }\n}\n\nfunction buildAppIfNeeded(repoRoot, skipBuild) {\n  const mainPath = path.join(repoRoot, 'out', 'main', 'index.js')\n  if (skipBuild) {\n    if (!existsSync(mainPath)) {\n      throw new Error(`--skip-build requested, but ${mainPath} does not exist`)\n    }\n    return mainPath\n  }\n  const { command, args } = resolveElectronViteBuildCommand(repoRoot)\n  execFileSync(command, args, {\n    cwd: repoRoot,","sourceCodeStart":316,"sourceCodeEnd":352,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/run-codex-real-account-validation.mjs#L316-L352","documentation":"Thrown by resolveElectronViteBuildCommand in run-codex-real-account-validation.mjs when the repository-local electron-vite CLI entry (node_modules/electron-vite/bin/electron-vite.js) is absent. The harness intentionally invokes this .js entry via process.execPath instead of npx (the npx .cmd shim fails under execFileSync on Windows). The error means the validation app cannot be built because the build tool is not installed.","triggerScenarios":"Calling buildAppIfNeeded(repoRoot, false) (or any path that resolves the build command) in a checkout where pnpm install was never run or node_modules was cleared/excluded. Exists-sync check on path.join(repoRoot,'node_modules','electron-vite','bin','electron-vite.js') returns false.","commonSituations":"Fresh clone, CI cache miss, monorepo where electron-vite is hoisted elsewhere, partial clean of node_modules, running in a container without the install step.","solutions":["Run pnpm install at the repo root so node_modules/electron-vite/bin/electron-vite.js is materialized.","Pass --skip-build together with a prebuilt out/main/index.js if you only want to run validation against an existing build.","Confirm electron-vite is declared in package.json devDependencies and not pruned by an install filter."],"exampleFix":"// before\nconst { command, args } = resolveElectronViteBuildCommand(repoRoot)\n// after\nconst electronViteEntry = path.join(repoRoot, 'node_modules', 'electron-vite', 'bin', 'electron-vite.js')\nif (!existsSync(electronViteEntry)) {\n  execFileSync('pnpm', ['install'], { cwd: repoRoot, stdio: 'inherit' })\n}\nconst { command, args } = resolveElectronViteBuildCommand(repoRoot)","handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs'\nimport path from 'node:path'\nfunction electronVitePresent(repoRoot) {\n  return existsSync(path.join(repoRoot, 'node_modules', 'electron-vite', 'bin', 'electron-vite.js'))\n}\n// call before buildAppIfNeeded\nif (!electronVitePresent(repoRoot)) {\n  throw new Error('Run pnpm install first, or pass --skip-build with a prebuilt out/main/index.js')\n}","typeGuard":"function isBuildCommand(value) {\n  return (\n    value != null &&\n    typeof value.command === 'string' &&\n    Array.isArray(value.args) &&\n    value.args.length > 0\n  )\n}","tryCatchPattern":"try {\n  const { command, args } = resolveElectronViteBuildCommand(repoRoot)\n} catch (err) {\n  if (/electron-vite entry not found/.test(err.message)) {\n    // install deps or switch to --skip-build with a prebuilt bundle\n  }\n  throw err\n}","preventionTips":["Run pnpm install as the first step of any validation/benchmark entrypoint.","Gate buildAppIfNeeded on an existsSync check and emit a clearer preflight message.","Cache node_modules in CI to avoid install-skip flakes."],"tags":["build","dependencies","electron-vite","validation"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}