stablyai/orca · error · Error

Renderer entry executes entry

Error message

Renderer entry ${sourceEntry} executes entry ${dependency}

What it means

assertEntryIsolation's core invariant: no Vite entry may import or dynamically import ANOTHER entry. Each entry is meant to be an isolated web-client page; cross-entry execution would bundle the wrong graph when projecting. Detected by checking whether any dependency in the import graph is itself in the entryKeys set.

Solutions

  1. Extract the shared code into a non-entry module that both entries import instead of entry-to-entry
  2. Move the shared code to a chunk that is not marked isEntry (configure rollupOptions.input or manualChunks)
  3. Audit src/renderer entry HTML files to confirm each loads a distinct, non-overlapping module graph
  4. If the cross-entry import is intentional, reconsider whether both should be entries or one should be a dynamic chunk
Defensive patterns

Strategy: validation

Validate before calling

function assertNoEntryCrossImports(manifest) {
  const entryKeys = new Set(Object.entries(manifest).filter(([, e]) => e?.isEntry).map(([k]) => k))
  for (const k of entryKeys) {
    for (const dep of [...(manifest[k].imports ?? []), ...(manifest[k].dynamicImports ?? [])]) {
      if (entryKeys.has(dep)) throw new Error(`entry ${k} imports entry ${dep}`)
    }
  }
}

Prevention

When it happens

Trigger: Two entry points (entry.isEntry === true) where one imports or dynamicImports the other, directly or transitively. Vite emits both as entries (isEntry true), so the dependency appears in entryKeys.

Common situations: Adding a new web-client entry that re-exports from an existing entry; an index.html per page where one page's module imports another page's module; refactoring shared code into a file that Vite then promotes to an entry.

Related errors


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

Appendix: source

Thrown at config/scripts/project-renderer-web-client.mjs:44

      .map(([key]) => key)
  )

  for (const sourceEntry of entryKeys) {
    const visited = new Set()
    const pending = [sourceEntry]
    while (pending.length > 0) {
      const key = pending.pop()
      if (visited.has(key)) {
        continue
      }
      visited.add(key)
      const entry = manifest[key]
      if (!entry || typeof entry !== 'object') {
        throw new Error(`Renderer manifest is missing entry: ${key}`)
      }
      for (const dependency of [...(entry.imports ?? []), ...(entry.dynamicImports ?? [])]) {
        if (entryKeys.has(dependency) && dependency !== sourceEntry) {
          throw new Error(`Renderer entry ${sourceEntry} executes entry ${dependency}`)
        }
        pending.push(dependency)
      }
    }
  }
}

function addOutputPath(outputPath) {
  if (
    typeof outputPath !== 'string' ||
    outputPath.length === 0 ||
    outputPath.startsWith('/') ||
    /^[A-Za-z]:/.test(outputPath) ||
    outputPath.includes('\\') ||
    outputPath.split('/').includes('..')
  ) {
    throw new Error(`Invalid renderer output path: ${String(outputPath)}`)
  }

View on GitHub (pinned to 1136503c6a)