{"record":{"id":"979666ecebf6fb3f","repo":"vercel/next.js","slug":"specified-pageextensions-is-not-an-array-of-string-979666","errorCode":null,"errorMessage":"Specified pageExtensions is not an array of strings, found \"${ext}\" of type \"${typeof ext}\". Please update this config or remove it.","messagePattern":"Specified pageExtensions is not an array of strings, found \"(.+?)\" of type \"(.+?)\"\\. Please update this config or remove it\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/config.ts","lineNumber":417,"sourceCode":"        }\n      }\n\n      if (key === 'pageExtensions') {\n        if (!Array.isArray(value)) {\n          throw new Error(\n            `Specified pageExtensions is not an array of strings, found \"${value}\". Please update this config or remove it.`\n          )\n        }\n\n        if (!value.length) {\n          throw new Error(\n            `Specified pageExtensions is an empty array. Please update it with the relevant extensions or remove it.`\n          )\n        }\n\n        value.forEach((ext) => {\n          if (typeof ext !== 'string') {\n            throw new Error(\n              `Specified pageExtensions is not an array of strings, found \"${ext}\" of type \"${typeof ext}\". Please update this config or remove it.`\n            )\n          }\n        })\n      }\n\n      const defaultValue = (defaultConfig as Record<string, unknown>)[key]\n\n      if (\n        !!value &&\n        value.constructor === Object &&\n        typeof defaultValue === 'object'\n      ) {\n        currentConfig[key] = {\n          ...defaultValue,\n          ...Object.keys(value).reduce<any>((c, k) => {\n            const v = value[k]\n            if (v !== undefined && v !== null) {","sourceCodeStart":399,"sourceCodeEnd":435,"githubUrl":"https://github.com/vercel/next.js/blob/34433fd12ee8074ea3f47af9f36255c7390d0301/packages/next/src/server/config.ts#L399-L435","documentation":"Per-element validation in assignDefaultsAndValidate: pageExtensions is an array, but iterating its entries found an element whose typeof is not string (a number, null, object, etc.). The offending element and its type are echoed; every extension in the list must be a string like 'tsx'.","triggerScenarios":"An entry in pageExtensions is not a string.","commonSituations":"A number or object inside the pageExtensions array in next.config.","solutions":["Make every pageExtensions entry a string."],"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"}