slint-ui/slint · warning

Missing resolved data for

Error message

Missing resolved data for ${rowNameKey} in single mode ${singleModeName}

What it means

In the figma-inspector backend, buildInstanceModel resolves color-variable data for each row/mode. When a row's resolved data is absent in 'single mode' generation, it logs this warning and substitutes a magenta placeholder (#FF00FF) with an explanatory comment instead of failing. The library throws it to surface a data-mapping gap in the Figma export while still producing usable output that visibly flags the missing value.

Solutions

  1. Re-export/refresh the Figma variable data so every mode has resolved data for every row
  2. Check the Figma collection for variables with missing mode values and fill them in
  3. Inspect why resolvedData lookup fails (key mismatch between rowNameKey and the resolved-data map) and fix the key construction
  4. If intentional, suppress/expect the warning and rely on the #FF00FF placeholder in the generated Slint output

Example fix

// before: silently produces placeholder
instance.modeData!.set(singleModeName, { value: "#FF00FF", ... });
// after: fail fast on incomplete data
if (!resolvedData) {
  throw new Error(`No resolved data for ${rowNameKey} in single mode ${singleModeName}`);
}
Defensive patterns

Strategy: validation

Validate before calling

const missing = rows.flatMap(r => singleModes.filter(m => !resolvedDataMap.get(key(r, m)))).map(([r, m]) => `${r}/${m}`);
if (missing.length) console.warn(`Modes without resolved data before export:`, missing);

Prevention

When it happens

Trigger: generateStructsAndInstances calls buildInstanceModel in single mode and the lookup of resolvedData for rowNameKey under singleModeName returns undefined — e.g. the Figma variable collection has no value for that mode, or the variable ID referenced by the row was not present in the resolved-data map.

Common situations: A Figma file where a variable mode was added after the row data was exported; a variable deleted or renamed in Figma while cached/filtered resolved data still references it; publishing a collection where not every mode defines a value for every variable.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


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

Appendix: source

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

                                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 >>>
                            });
                        } else {
                            console.warn(
                                `Missing resolved data for ${rowNameKey} in single mode ${singleModeName}`,
                            );
                            instance.modeData!.set(singleModeName, {
                                value: "#FF00FF",
                                comment: `Missing data for mode ${singleModeName}`,
                            });
                        }
                    }

                    propertyInstances.set(sanitizedChildName, instance);
                }
            }
            return;
        }

        // For non-root nodes
        const pathKey: string = path.join("/");
        if (!propertyInstances.has(pathKey)) {

View on GitHub (pinned to bb937076de)