{"record":{"id":"2a49b04aba39e9d1","repo":"medusajs/medusa","slug":"component-property-is-missing-at-index-j-in-t","errorCode":null,"errorMessage":"'component' property is missing at index ${j} in the 'displays' property.","messagePattern":"'component' property is missing at index (.+?) in the 'displays' property\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/admin/admin-vite-plugin/src/custom-fields/generate-custom-field-displays.ts","lineNumber":258,"sourceCode":"    const fullPath = getDisplayEntryPath(model, zone)\n\n    if (\n      !isValidCustomFieldDisplayZone(zone) ||\n      !isValidCustomFieldDisplayPath(fullPath)\n    ) {\n      logger.warn(\n        `'zone' is invalid at index ${j} in the 'displays' property. Received: ${zone}.`,\n        { file }\n      )\n      return\n    }\n\n    const componentProperty = element.properties.find(\n      (p) => isObjectProperty(p) && isIdentifier(p.key, { name: \"component\" })\n    ) as ObjectProperty | undefined\n\n    if (!componentProperty) {\n      logger.warn(\n        `'component' property is missing at index ${j} in the 'displays' property.`,\n        { file }\n      )\n      return\n    }\n\n    displays.push({\n      zone: zone,\n      Component: getDisplayComponent(index, j),\n    })\n  })\n\n  return displays.length > 0 ? displays : null\n}\n\nfunction getDisplayEntryPath(model: CustomFieldModel, zone: string): string {\n  return `${model}.${zone}.$display`\n}","sourceCodeStart":240,"sourceCodeEnd":276,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/admin/admin-vite-plugin/src/custom-fields/generate-custom-field-displays.ts#L240-L276","documentation":"Each displays entry must declare a 'component' property — the path to the React component file that renders the custom-field display. When an entry has zone but no statically parseable component key, that entry is skipped with this warning naming its index.","triggerScenarios":"A displays entry like { zone: \"general\" } with no component; component defined via a variable or computed key; the key misspelled (Component, componentPath).","commonSituations":"Assuming the component is auto-derived from the file location; refactoring paths into constants; partial copy-paste from examples.","solutions":["Add component: \"<path-to-component-file>\" to the displays entry at the reported index","Keep the value a plain string literal path resolvable from the project","Verify exact key spelling: component"],"exampleFix":"// before\ndisplays: [\n  { zone: \"general\" },\n]\n\n// after\ndisplays: [\n  {\n    zone: \"general\",\n    component: \"/src/admin/custom-fields/brand/components/name.tsx\",\n  },\n]","handlingStrategy":"validation","validationCode":"cfg.displays.forEach((d, i) => {\n  if (typeof d.component !== \"string\") throw new Error(`displays[${i}] missing component`)\n})","typeGuard":"const isDisplayEntry = (d: unknown): d is { zone: string; component: string } =>\n  typeof d === \"object\" && d !== null &&\n  typeof (d as any).zone === \"string\" && typeof (d as any).component === \"string\"","tryCatchPattern":"null","preventionTips":["Every displays entry needs a component path string literal","Verify component paths resolve before starting the dev server","Type-check configs against the official display entry type"],"tags":["custom-fields","display-config","component-path","build-warning"],"backgroundTag":"invalid-custom-field-config","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}