vercel/next.js · error
Both ${item.domain} and ${domainItem.domain} configured the
Error message
Both ${item.domain} and ${domainItem.domain} configured the locale (${locale}) but only one can. Remove it from one i18n.domains config to continue What it means
i18n domains validation in assignDefaultsAndValidate: while checking each i18n.domains entry, a locale in item.locales was also configured on another domainItem in the list. A locale may be assigned to only one domain; the warning names both domains and the duplicated locale and asks for its removal from one of them so routing is unambiguous.
Source
Thrown at packages/next/src/server/config.ts:1315
)
if (!silent && defaultLocaleDuplicate) {
console.warn(
`Both ${item.domain} and ${defaultLocaleDuplicate.domain} configured the defaultLocale ${item.defaultLocale} but only one can. Change one item's default locale to continue`
)
return true
}
let hasInvalidLocale = false
if (Array.isArray(item.locales)) {
for (const locale of item.locales) {
if (typeof locale !== 'string') hasInvalidLocale = true
for (const domainItem of i18n.domains || []) {
if (domainItem === item) continue
if (domainItem.locales && domainItem.locales.includes(locale)) {
console.warn(
`Both ${item.domain} and ${domainItem.domain} configured the locale (${locale}) but only one can. Remove it from one i18n.domains config to continue`
)
hasInvalidLocale = true
break
}
}
}
}
return hasInvalidLocale
})
if (invalidDomainItems.length > 0) {
throw new Error(
`Invalid i18n.domains values:\n${invalidDomainItems
.map((item: any) => JSON.stringify(item))
.join(
'\n'View on GitHub (pinned to 258b1c1bc0)
Solutions
- Remove the duplicated locale from one of the i18n.domains entries; a locale can only belong to one domain.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/next/src/server/config.ts:1268 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vercel/next.js@258b1c1bc0 (2026-08-19).
Data as JSON: /api/errors/26dd733e7d5f2760.
Report an issue: GitHub.