slint-ui/slint · warning

Missing resolved data for

Error message

Missing resolved data for ${rowNameKey} in mode ${modeName}

What it means

When building the instance model for exported Slint structs/enum modes, each mode row expects resolved variable data. If the resolution step produced no data for a (row, mode) pair, the code logs this warning and inserts a magenta placeholder value ('#FF00FF') with an explanatory comment instead of failing the export. It signals an incomplete or inconsistent variable resolution for that mode.

Solutions

  1. Re-export/re-sync the Figma data so all mode variables are re-fetched with current ids
  2. Fix the source variable in Figma (recreate or relink the missing mode value)
  3. Inspect the log for the specific rowNameKey/modeName and patch the referenced variable id in the export pipeline
  4. Replace the '#FF00FF' placeholder downstream only after confirming the variable is intentionally absent

Example fix

// before
// unresolved mode silently becomes magenta placeholder
// after: fail fast on missing data
if (!resolvedData) {
  throw new Error(`Unresolved variable for ${rowNameKey} in mode ${modeName}`);
}
instance.modeData!.set(modeName, { value: resolvedData.value, comment: resolvedData.comment });
Defensive patterns

Strategy: validation

Validate before calling

for (const mode of modes) {
  const resolved = resolutionMap.get(`${rowNameKey}:${mode}`);
  if (!resolved) {
    throw new Error(`Unresolved data for ${rowNameKey} in mode ${mode} — fix the Figma source before exporting`);
  }
}

Type guard

function hasResolvedData(entry) {
  return entry != null && typeof entry === 'object' && typeof entry.value === 'string' && entry.value.length > 0;
}

Try / catch

try {
  const model = await buildInstanceModel(rows, modes);
} catch (e) {
  console.error('Export aborted: incomplete mode data', e.message);
  process.exitCode = 1;
}

Prevention

When it happens

Trigger: Running generateStructsAndInstances/buildInstanceModel over exported Figma data where a mode's variable reference could not be resolved — e.g. the variable was deleted, unreachable, or getOriginalVariableData returned null for that row's reference.

Common situations: Figma files where some variable modes were removed after being referenced; partial library access; stale exports referencing variables absent from the current file.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of slint-ui/slint@bb937076de (2026-09-16). Data as JSON: /api/errors/89726752812d5254. Report an issue: GitHub.

Appendix: source

Thrown at tools/figma-inspector/backend/utils/export-variables.ts:430

                            `Missing resolved variable data for root key: ${rowNameKey}`,
                        );
                        // Add instance even if empty to avoid breaking hierarchy
                        propertyInstances.set(sanitizedChildName, instance);
                        continue; // Skip to next child
                    }

                    if (collectionData.modes.size > 1) {
                        instance.isMultiMode = true;
                        for (const modeName of collectionData.modes) {
                            const resolvedData =
                                resolvedVariableModesMap.get(modeName);
                            if (resolvedData) {
                                instance.modeData!.set(modeName, {
                                    value: resolvedData.value,
                                    comment: resolvedData.comment, // <<< Use resolved comment >>>
                                });
                            } else {
                                console.warn(
                                    `Missing resolved data for ${rowNameKey} in mode ${modeName}`,
                                );
                                instance.modeData!.set(modeName, {
                                    value: "#FF00FF",
                                    comment: `Missing data for mode ${modeName}`,
                                });
                            }
                        }
                    } else {
                        // Single mode
                        const singleModeName =
                            [...collectionData.modes][0] || "value";
                        const resolvedData =
                            resolvedVariableModesMap.get(singleModeName);
                        if (resolvedData) {
                            instance.modeData!.set(singleModeName, {
                                value: resolvedData.value,
                                comment: resolvedData.comment, // <<< Use resolved comment >>>

View on GitHub (pinned to bb937076de)