stablyai/orca · error · Error
Cannot build the validation app: electron-vite entry not fou
Error message
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. What it means
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.
Source
Thrown at config/scripts/run-codex-real-account-validation.mjs:334
}
return options
}
// Why: `npx` resolves to a .cmd shim on Windows that execFileSync cannot launch
// (ENOENT), so the harness could not build its own app there. Run the
// repository-local electron-vite JS entry with the current Node binary instead;
// process.execPath + a resolved .js path behaves identically on macOS, Linux,
// and Windows without a shell.
export function resolveElectronViteBuildCommand(repoRoot) {
const electronViteEntry = path.join(
repoRoot,
'node_modules',
'electron-vite',
'bin',
'electron-vite.js'
)
if (!existsSync(electronViteEntry)) {
throw new Error(
`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.'
)
}
return { command: process.execPath, args: [electronViteEntry, 'build', '--mode', 'e2e'] }
}
function buildAppIfNeeded(repoRoot, skipBuild) {
const mainPath = path.join(repoRoot, 'out', 'main', 'index.js')
if (skipBuild) {
if (!existsSync(mainPath)) {
throw new Error(`--skip-build requested, but ${mainPath} does not exist`)
}
return mainPath
}
const { command, args } = resolveElectronViteBuildCommand(repoRoot)
execFileSync(command, args, {
cwd: repoRoot,View on GitHub (pinned to 1136503c6a)
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.
Example fix
// before
const { command, args } = resolveElectronViteBuildCommand(repoRoot)
// after
const electronViteEntry = path.join(repoRoot, 'node_modules', 'electron-vite', 'bin', 'electron-vite.js')
if (!existsSync(electronViteEntry)) {
execFileSync('pnpm', ['install'], { cwd: repoRoot, stdio: 'inherit' })
}
const { command, args } = resolveElectronViteBuildCommand(repoRoot) Defensive patterns
Strategy: validation
Validate before calling
import { existsSync } from 'node:fs'
import path from 'node:path'
function electronVitePresent(repoRoot) {
return existsSync(path.join(repoRoot, 'node_modules', 'electron-vite', 'bin', 'electron-vite.js'))
}
// call before buildAppIfNeeded
if (!electronVitePresent(repoRoot)) {
throw new Error('Run pnpm install first, or pass --skip-build with a prebuilt out/main/index.js')
} Type guard
function isBuildCommand(value) {
return (
value != null &&
typeof value.command === 'string' &&
Array.isArray(value.args) &&
value.args.length > 0
)
} Try / catch
try {
const { command, args } = resolveElectronViteBuildCommand(repoRoot)
} catch (err) {
if (/electron-vite entry not found/.test(err.message)) {
// install deps or switch to --skip-build with a prebuilt bundle
}
throw err
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Missing ${entryPath}; run pnpm exec electron-vite build firs
- Unsupported macOS build architecture: ${architecture}
- Renderer manifest is missing entry: ${key}
- Invalid renderer output path: ${String(outputPath)}
- Electron builds are not available on platform: ${targetPlatf
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/ad39da6f709b01d9.
Report an issue: GitHub.