{"record":{"id":"ccc1eca0cc3137a4","repo":"heygen-com/hyperframes","slug":"figma-asset-import-produced-no-result-for-refin-ccc1ec","errorCode":null,"errorMessage":"figma asset import produced no result for \"${refInputs[i]}\"","messagePattern":"figma asset import produced no result for \"(.+?)\"","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/figma/asset.ts","lineNumber":235,"sourceCode":"          nodeId,\n          r.url,\n          r.ext,\n          opts,\n          version,\n          deps,\n          description,\n          entity,\n        );\n      }\n    }\n  } finally {\n    // Regenerate once — in `finally` so a mid-batch RENDER_FAILED still leaves\n    // index.md consistent with the nodes that DID freeze, not stale until the\n    // next import.\n    safeRegenerateIndex(deps.projectDir);\n  }\n  return slots.map((s, i) => {\n    if (!s) throw new Error(`figma asset import produced no result for \"${refInputs[i]}\"`);\n    return s;\n  });\n}\n\n/** index.md is a single table row per record — newlines/tabs in a\n * description would corrupt the whole table. */\nfunction normalizeMeta(value: string | undefined): string | undefined {\n  if (value === undefined) return undefined;\n  const cleaned = value.replace(/\\s+/g, \" \").trim();\n  return cleaned.length > 0 ? cleaned : undefined;\n}\n\n/** Keep the agent-readable inventory in step with the manifest (media-use\n * regenerates the same file after its writes). Best-effort: the import is\n * already durable, so an index write failure must not fail the command. */\nfunction safeRegenerateIndex(projectDir: string): void {\n  try {\n    regenerateIndex(projectDir);","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/heygen-com/hyperframes/blob/c2996c8626135db5253519359d8a063d3bafad8d/packages/cli/src/commands/figma/asset.ts#L217-L253","documentation":"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.","triggerScenarios":"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.","commonSituations":"Only via a future refactor that breaks the slot-fill invariant; not something a caller can trigger through normal inputs.","solutions":["Report as an internal bug — do not write application handling for it","Re-run the import; if reproducible, capture the full ref list and file version"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await runAssetImportMany(refs, opts, deps);\n} catch (err) {\n  // Defensive invariant guard; a null slot here is a bug, not input error.\n  if ((err as Error).message.includes('produced no result')) {\n    console.error('internal: runAssetImportMany left a null slot');\n  }\n  throw err;\n}","preventionTips":["Treat as a bug report trigger, not an expected error path","Pin the library version to detect a slot-fill regression"],"tags":["figma","asset","defensive","invariant"],"backgroundTag":null,"analyzedSha":"c2996c8626135db5253519359d8a063d3bafad8d","analyzedAt":"2026-08-12T22:18:56.877Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}