{"record":{"id":"26dd733e7d5f2760","repo":"vercel/next.js","slug":"both-item-domain-and-domainitem-domain-confi","errorCode":null,"errorMessage":"Both ${item.domain} and ${domainItem.domain} configured the locale (${locale}) but only one can. Remove it from one i18n.domains config to continue","messagePattern":"Both (.+?) and (.+?) configured the locale \\((.+?)\\) but only one can\\. Remove it from one i18n\\.domains config to continue","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/server/config.ts","lineNumber":1315,"sourceCode":"        )\n\n        if (!silent && defaultLocaleDuplicate) {\n          console.warn(\n            `Both ${item.domain} and ${defaultLocaleDuplicate.domain} configured the defaultLocale ${item.defaultLocale} but only one can. Change one item's default locale to continue`\n          )\n          return true\n        }\n\n        let hasInvalidLocale = false\n\n        if (Array.isArray(item.locales)) {\n          for (const locale of item.locales) {\n            if (typeof locale !== 'string') hasInvalidLocale = true\n\n            for (const domainItem of i18n.domains || []) {\n              if (domainItem === item) continue\n              if (domainItem.locales && domainItem.locales.includes(locale)) {\n                console.warn(\n                  `Both ${item.domain} and ${domainItem.domain} configured the locale (${locale}) but only one can. Remove it from one i18n.domains config to continue`\n                )\n                hasInvalidLocale = true\n                break\n              }\n            }\n          }\n        }\n\n        return hasInvalidLocale\n      })\n\n      if (invalidDomainItems.length > 0) {\n        throw new Error(\n          `Invalid i18n.domains values:\\n${invalidDomainItems\n            .map((item: any) => JSON.stringify(item))\n            .join(\n              '\\n'","sourceCodeStart":1297,"sourceCodeEnd":1333,"githubUrl":"https://github.com/vercel/next.js/blob/258b1c1bc05f7099816b88f70b7b3422b24a4b8d/packages/next/src/server/config.ts#L1297-L1333","documentation":"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.","triggerScenarios":"Thrown at packages/next/src/server/config.ts:1268 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the duplicated locale from one of the i18n.domains entries; a locale can only belong to one domain."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"258b1c1bc05f7099816b88f70b7b3422b24a4b8d","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}