{"record":{"id":"bf85ed7bdcd70524","repo":"vercel/next.js","slug":"specified-i18n-locales-should-be-an-array-received","errorCode":null,"errorMessage":"Specified i18n.locales should be an Array received ${typeof i18n.locales}.\nSee more info here: https://nextjs.org/docs/messages/invalid-i18n-config","messagePattern":"Specified i18n\\.locales should be an Array received (.+?)\\.\nSee more info here: https://nextjs\\.org/docs/messages/invalid-i18n-config","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/config.ts","lineNumber":1278,"sourceCode":"  }\n  // Ensure both properties are set to the same value\n  result.outputFileTracingRoot = rootDir\n  dset(result, ['turbopack', 'root'], rootDir)\n\n  setHttpClientAndAgentOptions(result || defaultConfig)\n\n  if (result.i18n) {\n    const { i18n } = result\n    const i18nType = typeof i18n\n\n    if (i18nType !== 'object') {\n      throw new Error(\n        `Specified i18n should be an object received ${i18nType}.\\nSee more info here: https://nextjs.org/docs/messages/invalid-i18n-config`\n      )\n    }\n\n    if (!Array.isArray(i18n.locales)) {\n      throw new Error(\n        `Specified i18n.locales should be an Array received ${typeof i18n.locales}.\\nSee more info here: https://nextjs.org/docs/messages/invalid-i18n-config`\n      )\n    }\n\n    if (i18n.locales.length > 100 && !silent) {\n      Log.warn(\n        `Received ${i18n.locales.length} i18n.locales items which exceeds the recommended max of 100.\\nSee more info here: https://nextjs.org/docs/advanced-features/i18n-routing#how-does-this-work-with-static-generation`\n      )\n    }\n\n    const defaultLocaleType = typeof i18n.defaultLocale\n\n    if (!i18n.defaultLocale || defaultLocaleType !== 'string') {\n      throw new Error(\n        `Specified i18n.defaultLocale should be a string.\\nSee more info here: https://nextjs.org/docs/messages/invalid-i18n-config`\n      )\n    }\n","sourceCodeStart":1260,"sourceCodeEnd":1296,"githubUrl":"https://github.com/vercel/next.js/blob/34433fd12ee8074ea3f47af9f36255c7390d0301/packages/next/src/server/config.ts#L1260-L1296","documentation":"i18n config validation in assignDefaultsAndValidate: the i18n object is present and an object, but i18n.locales fails Array.isArray — it is not an array. locales must be a list of locale-tag strings; the received type is echoed with a link to the i18n config docs.","triggerScenarios":"i18n.locales is not an array.","commonSituations":"Setting i18n.locales to a string or object in next.config.","solutions":["Set i18n.locales to an array of locale strings."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"34433fd12ee8074ea3f47af9f36255c7390d0301","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}