supabase/supabase · error · Error
Schema error: schema.shape['${key}'] is undefined. Check sch
Error message
Schema error: schema.shape['${key}'] is undefined. Check schema definition. What it means
Error "Schema error: schema.shape['${key}'] is undefined. Check schema definition." thrown in supabase/supabase.
Source
Thrown at apps/ui-library/registry/default/platform/platform-kit-nextjs/components/dynamic-form.tsx:90
}
return currentSchema
}
export function DynamicForm<T extends z.ZodRawShape = z.ZodRawShape>({
schema,
onSubmit,
isLoading = false,
initialValues,
labels,
columnInfo,
}: DynamicFormProps<T>) {
const isInitializingRef = useRef(true)
const defaultValues = Object.keys(schema.shape).reduce(
(acc, key) => {
const originalFieldSchema = schema.shape[key]
if (typeof originalFieldSchema === 'undefined') {
throw new Error(
`Schema error: schema.shape['${key}'] is undefined. Check schema definition.`
)
}
// Support both old (typeName) and new (type) Zod formats
const getTypeName = (def: Record<string, any>) => def.typeName || def.type
if (
getTypeName(getZodDef(originalFieldSchema)) === 'ZodDefault' ||
getTypeName(getZodDef(originalFieldSchema)) === 'default'
) {
acc[key] = getZodDef(originalFieldSchema).defaultValue()
return acc
}
const baseType = unwrapZodType(originalFieldSchema)
switch (getTypeName(getZodDef(baseType))) {View on GitHub (pinned to beee91b9c2)
When it happens
Trigger: Thrown at apps/ui-library/registry/default/platform/platform-kit-nextjs/components/dynamic-form.tsx:90 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of supabase/supabase@beee91b9c2 (2026-08-12).
Data as JSON: /api/errors/04e530372f5d4141.
Report an issue: GitHub.