medusajs/medusa · warning
'fields' property is missing from the ${j} entry in the 'for
Error message
'fields' property is missing from the ${j} entry in the 'forms' property in ${file}. What it means
In the getConfig flow, every 'forms' entry must include a 'fields' object. When the entry at index j has no fields key, the plugin warns (including the source file) and skips the entry, since there is nothing to generate configuration for.
Source
Thrown at packages/admin/admin-vite-plugin/src/custom-fields/generate-custom-field-forms.ts:574
const zone = zoneProperty.value.value
const fullPath = getFormEntryConfigPath(model, zone)
if (
!isValidCustomFieldFormZone(zone) ||
!isValidCustomFieldFormConfigPath(fullPath)
) {
logger.warn(
`'zone' property at the ${j} index of the 'forms' property is not a valid custom field form zone for the '${model}' model. Received: ${zone}.`
)
return
}
const fieldsObject = element.properties.find(
(p) => isObjectProperty(p) && isIdentifier(p.key, { name: "fields" })
) as ObjectProperty | undefined
if (!fieldsObject) {
logger.warn(
`'fields' property is missing from the ${j} entry in the 'forms' property in ${file}.`,
{ file }
)
return
}
const fields: CustomFieldConfigField[] = []
if (!isObjectExpression(fieldsObject.value)) {
logger.warn(
`'fields' property at the ${j} index of the 'forms' property is malformed. The 'fields' property must be an object.`,
{ file }
)
return
}
fieldsObject.value.properties.forEach((field) => {
if (!isObjectProperty(field) || !isIdentifier(field.key)) {View on GitHub (pinned to 5e06e544a2)
Solutions
- Add fields: { ... } as a sibling of zone/tab in the entry
- Check the spelling and case of the property name
- Ensure fields is not accidentally nested inside another property
Example fix
// before
forms: [{ zone: 'general', tab: 'general' }]
// after
forms: [{ zone: 'general', tab: 'general', fields: { myField: { ... } } }] Defensive patterns
Strategy: validation
Validate before calling
forms.forEach((f, i) => {
if (!f.fields || typeof f.fields !== 'object') {
throw new Error(`forms[${i}] is missing a fields object`)
}
}) Type guard
const hasFieldsKey = (f: unknown): f is { fields: object } =>
typeof f === 'object' && f !== null && 'fields' in (f as object) Prevention
- Define a FormConfig type with required fields and use it in every admin config file
When it happens
Trigger: forms: [{ zone: 'general' }] with no fields, or the key misspelled as 'Fields'/'field'.
Common situations: Template configs left half-finished, refactors renaming the key, or merging configs that dropped fields.
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/3e69519048cb5197.
Report an issue: GitHub.