stablyai/orca · error · Error
--skip-build requested, but ${mainPath} does not exist
Error message
--skip-build requested, but ${mainPath} does not exist What it means
Thrown by buildAppIfNeeded in run-codex-real-account-validation.mjs when --skip-build was requested but no prebuilt out/main/index.js exists at the repo root. The skip path is a shortcut that reuses an existing Electron main bundle; without that bundle there is nothing to launch.
Source
Thrown at config/scripts/run-codex-real-account-validation.mjs:346
'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,
stdio: 'inherit',
env: { ...process.env, VITE_EXPOSE_STORE: 'true' }
})
return mainPath
}
function validationCliCommand() {
if (process.env.ORCA_VALIDATION_CLI) {
return process.env.ORCA_VALIDATION_CLI
}
if (process.env.ORCA_CLI_COMMAND) {
return process.env.ORCA_CLI_COMMANDView on GitHub (pinned to 1136503c6a)
Solutions
- Run the script without --skip-build once to produce out/main/index.js.
- Run electron-vite build --mode e2e manually, then re-run with --skip-build.
- Restore a previously built out/main/index.js from your artifact cache.
Example fix
// before node config/scripts/run-codex-real-account-validation.mjs --skip-build // after pnpm install && npx electron-vite build --mode e2e node config/scripts/run-codex-real-account-validation.mjs --skip-build
Defensive patterns
Strategy: validation
Validate before calling
import { existsSync } from 'node:fs'
import path from 'node:path'
const mainPath = path.join(repoRoot, 'out', 'main', 'index.js')
if (skipBuild && !existsSync(mainPath)) {
throw new Error(`Build first, or drop --skip-build; missing ${mainPath}`)
} Type guard
function isPrebuiltMain(repoRoot) {
return existsSync(path.join(repoRoot, 'out', 'main', 'index.js'))
} Try / catch
try {
mainPath = buildAppIfNeeded(repoRoot, options.skipBuild)
} catch (err) {
if (/--skip-build requested/.test(err.message)) {
// build the app once, then retry with --skip-build
}
throw err
} Prevention
- Before passing --skip-build, assert out/main/index.js exists in a preflight check.
- Cache the out/ build artifact in CI when using --skip-build.
- Document that --skip-build requires a prior successful build.
When it happens
Trigger: Invoking the script with --skip-build in a checkout where electron-vite build has never run (no out/ directory), or after out/ was deleted/cleaned.
Common situations: Running validation locally after a git clean, CI where the build step was skipped but no artifact was cached, mismatch between --skip-build expectation and an unbuilt tree.
Related errors
- Electron builds are not available on platform: ${targetPlatf
- --skip-build requested, but ${mainPath} does not exist
- ORCA_ELECTRON_PACKAGE_RETRY_DELAYS_MS must contain non-negat
- Unsupported macOS build architecture: ${architecture}
- Renderer manifest is missing entry: ${key}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/4366b7a65cdb34a2.
Report an issue: GitHub.