medusajs/medusa · warning
'zone' property is missing from the ${j} index of the 'forms
Error message
'zone' property is missing from the ${j} index of the 'forms' property. What it means
This is the getConfig variant of the zone check: each entry in the 'forms' array must contain a 'zone' property. When it is missing, the plugin cannot map the config to an injection point and skips the entry with this warning.
Source
Thrown at packages/admin/admin-vite-plugin/src/custom-fields/generate-custom-field-forms.ts:533
}
const configs: CustomFieldConfig[] = []
formArray.elements.forEach((element, j) => {
if (!isObjectExpression(element)) {
logger.warn(
`'forms' property at the ${j} index is malformed. The 'forms' property must be an object.`,
{ file }
)
return
}
const zoneProperty = element.properties.find(
(p) => isObjectProperty(p) && isIdentifier(p.key, { name: "zone" })
) as ObjectProperty | undefined
if (!zoneProperty) {
logger.warn(
`'zone' property is missing from the ${j} index of the 'forms' property.`,
{ file }
)
return
}
if (isTemplateLiteral(zoneProperty.value)) {
logger.warn(
`'zone' property at the ${j} index of the 'forms' property cannot be a template literal (e.g. \`general\`).`,
{ file }
)
return
}
if (!isStringLiteral(zoneProperty.value)) {
logger.warn(
`'zone' property at the ${j} index of the 'forms' property is not a string literal (e.g. 'general' or 'attributes').`,
{ file }View on GitHub (pinned to 5e06e544a2)
Solutions
- Add zone: 'general' (or another supported zone literal) to the entry at index j
- Verify the key name is exactly 'zone'
- Re-run the build to confirm the warning is gone
Example fix
// before
forms: [{ tab: 'general', fields: { ... } }]
// after
forms: [{ zone: 'general', tab: 'general', fields: { ... } }] Defensive patterns
Strategy: validation
Validate before calling
forms.forEach((f, i) => {
if (typeof f.zone !== 'string') throw new Error(`forms[${i}].zone is required`)
}) Type guard
const hasZone = (f: unknown): f is { zone: string } =>
typeof f === 'object' && f !== null && typeof (f as any).zone === 'string' Prevention
- Type your configs with a shared FormConfig interface requiring zone
When it happens
Trigger: A forms entry containing only fields: {...} or only tab: 'general', with no zone key.
Common situations: Minimal config examples copied from older docs, or refactoring that accidentally dropped the zone line.
Related errors
- 'zone' property is missing from the ${j} index of the 'forms
- 'tab' property at the ${j} index of the 'forms' property is
- 'zone' and 'tab' properties at the ${j} index of the 'forms'
- The 'fields' property is missing at the ${j} index of the 'f
- The 'fields' property at the ${j} index of the 'forms' prope
AI-assisted analysis of medusajs/medusa@5e06e544a2 (2026-08-27).
Data as JSON: /api/errors/17978b1c0365702e.
Report an issue: GitHub.