stablyai/orca · error · Error

Missing ${ENTRY_PATH}; run pnpm run build:electron-vite firs

Error message

Missing ${ENTRY_PATH}; run pnpm run build:electron-vite first

What it means

The fault harness bundles and loads out/main/parcel-watcher-process-entry.js (ENTRY_PATH) to drive the WatcherProcessSupervisor against a real @parcel/watcher child. If the build artifact is absent (the file does not existSync), the harness cannot import the supervisor and aborts, telling the operator to run the build first.

Source

Thrown at config/scripts/runtime-file-watcher-fault-harness.mjs:65

  await build({
    entryPoints: [SUPERVISOR_SOURCE],
    bundle: true,
    platform: 'node',
    format: 'cjs',
    outfile,
    external: ['@parcel/watcher', 'electron'],
    logLevel: 'silent'
  })
  return require(outfile).WatcherProcessSupervisor
}

async function main() {
  if (process.platform === 'win32') {
    console.log('[runtime-file-watcher-fault] SKIP: SIGSEGV oracle is macOS/Linux only')
    return
  }
  if (!existsSync(ENTRY_PATH)) {
    throw new Error(`Missing ${ENTRY_PATH}; run pnpm run build:electron-vite first`)
  }

  // Why: mkdtemp/realpath/bundle/construction can fail before the body runs.
  // Keep cleanup in finally from the first successful mkdtemp onward, and clean
  // the original temp path if realpath never succeeds.
  let createdRootPath
  let bundleDir
  let rootPath
  let supervisor
  let subscription
  let watcherCanaryDir
  let eventListener = () => undefined
  let rejectWatcherError
  const watcherError = new Promise((_, reject) => {
    rejectWatcherError = reject
  })
  // Attach early so a callback rejection before the race cannot become unhandled.
  watcherError.catch(() => undefined)

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Run pnpm run build:electron-vite first, then the fault harness.
  2. Add build:electron-vite as a prerequisite script dependency of the fault-harness task in package.json.
  3. If the path is wrong (custom out dir), update ENTRY_PATH at runtime-file-watcher-fault-harness.mjs:8 to match.

Example fix

// before
node config/scripts/runtime-file-watcher-fault-harness.mjs
// after
pnpm run build:electron-vite && node config/scripts/runtime-file-watcher-fault-harness.mjs
Defensive patterns

Strategy: validation

Validate before calling

const { existsSync } = require('node:fs')
const ENTRY_PATH = require('path').resolve('out/main/parcel-watcher-process-entry.js')
if (!existsSync(ENTRY_PATH)) {
  console.error(`Missing ${ENTRY_PATH}; run pnpm run build:electron-vite first`)
  process.exit(1)
}

Try / catch

try {
  if (!existsSync(ENTRY_PATH)) throw new Error(`Missing ${ENTRY_PATH}; run pnpm run build:electron-vite first`)
  // ...harness body...
} catch (err) {
  if (/Missing .*build:electron-vite/.test(String(err))) {
    console.error('Build artifact missing — run pnpm run build:electron-vite and retry.')
  }
  throw err
}

Prevention

When it happens

Trigger: Running runtime-file-watcher-fault-harness.mjs before building the electron main bundle; after `git clean -fdx` wiped out/; in a fresh checkout/CI step that skipped build:electron-vite.

Common situations: Fresh clone where the developer ran the fault test without building; CI job reordering that runs the fault harness before the build step; out/ deleted by a clean script.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/923e198c6984e06b. Report an issue: GitHub.