serverless/serverless · error · ServerlessError
SCHEMA_COLLISION
SCHEMA_COLLISION
Error message
Top-level property '${name}' already have a definition - this property might have already been defined by the Serverless framework or one other plugin What it means
Error "Top-level property '${name}' already have a definition - this property might have already been defined by the Serverless framework or one other plugin" thrown in serverless/serverless.
Source
Thrown at packages/serverless/lib/classes/config-schema-handler/index.js:160
'http://slss.io/configuration-validation',
)}`,
].join('\n'),
)
if (!this.serverless.configurationInput.configValidationMode) {
this.serverless._logDeprecation(
'CONFIG_VALIDATION_MODE_DEFAULT_V3',
'Starting with the next major, Serverless will throw on configuration errors by' +
' default. Adapt to this behavior now by adding "configValidationMode: error" to' +
' the service configuration',
)
}
}
}
}
defineTopLevelProperty(name, subSchema) {
if (this.schema.properties[name]) {
throw new ServerlessError(
`Top-level property '${name}' already have a definition - this property might have already been defined by the Serverless framework or one other plugin`,
'SCHEMA_COLLISION',
)
}
this.schema.properties[name] = subSchema
}
defineBuildProperty(name, subSchema) {
const idx = this.schema.properties.build.anyOf.findIndex(
(item) => item.type === 'object',
)
if (this.schema.properties.build.anyOf[idx].properties[name]) {
throw new ServerlessError(
`Build property '${name}' already have a definition - this property might have already been defined by the Serverless framework or one other plugin`,
'SCHEMA_COLLISION',
)
}
this.schema.properties.build.anyOf[idx].properties[name] = subSchemaView on GitHub (pinned to b9d7ea51c8)
Solutions
- Rename the custom top-level property or schema definition so it does not collide with an existing framework or plugin definition.
- Remove duplicate defineProvider/defineTopLevelProperty calls registering the same property.
When it happens
Trigger: Thrown at packages/serverless/lib/classes/config-schema-handler/index.js:160 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of serverless/serverless@b9d7ea51c8 (2026-08-13).
Data as JSON: /api/errors/245a412185551518.
Report an issue: GitHub.