heygen-com/hyperframes · error · Error

figma asset import produced no result for "${refInputs[i]}"

Error message

figma asset import produced no result for "${refInputs[i]}"

What it means

Thrown by the final slots.map() in runAssetImportMany(): after the batch render + freeze loop, every slot must be filled. Each miss index is assigned by freezeAndRecord or throws RENDER_FAILED first, so a null slot here is an invariant break. The index i is used to look up refInputs[i] for the message. Like error 125, this is a defensive guard that signals an internal bug if reached.

Source

Thrown at packages/cli/src/commands/figma/asset.ts:235

          nodeId,
          r.url,
          r.ext,
          opts,
          version,
          deps,
          description,
          entity,
        );
      }
    }
  } finally {
    // Regenerate once — in `finally` so a mid-batch RENDER_FAILED still leaves
    // index.md consistent with the nodes that DID freeze, not stale until the
    // next import.
    safeRegenerateIndex(deps.projectDir);
  }
  return slots.map((s, i) => {
    if (!s) throw new Error(`figma asset import produced no result for "${refInputs[i]}"`);
    return s;
  });
}

/** index.md is a single table row per record — newlines/tabs in a
 * description would corrupt the whole table. */
function normalizeMeta(value: string | undefined): string | undefined {
  if (value === undefined) return undefined;
  const cleaned = value.replace(/\s+/g, " ").trim();
  return cleaned.length > 0 ? cleaned : undefined;
}

/** Keep the agent-readable inventory in step with the manifest (media-use
 * regenerates the same file after its writes). Best-effort: the import is
 * already durable, so an index write failure must not fail the command. */
function safeRegenerateIndex(projectDir: string): void {
  try {
    regenerateIndex(projectDir);

View on GitHub (pinned to c2996c8626)

Solutions

  1. Report as an internal bug — do not write application handling for it
  2. Re-run the import; if reproducible, capture the full ref list and file version
Defensive patterns

Strategy: try-catch

Try / catch

try {
  await runAssetImportMany(refs, opts, deps);
} catch (err) {
  // Defensive invariant guard; a null slot here is a bug, not input error.
  if ((err as Error).message.includes('produced no result')) {
    console.error('internal: runAssetImportMany left a null slot');
  }
  throw err;
}

Prevention

When it happens

Trigger: Unreachable in normal flow: would require a miss index to be skipped without assignment despite being enumerated by missIndexes, which the for-loop over missIndexes prevents.

Common situations: Only via a future refactor that breaks the slot-fill invariant; not something a caller can trigger through normal inputs.

Related errors


AI-assisted analysis of heygen-com/hyperframes@c2996c8626 (2026-08-12). Data as JSON: /api/errors/ccc1eca0cc3137a4. Report an issue: GitHub.