vercel/next.js · error · Error
Specified pageExtensions is not an array of strings, found
Error message
Specified pageExtensions is not an array of strings, found "${ext}" of type "${typeof ext}". Please update this config or remove it. What it means
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'.
Solutions
- Make every pageExtensions entry a string.
Defensive patterns
Strategy: validation
When it happens
Trigger: An entry in pageExtensions is not a string.
Common situations: A number or object inside the pageExtensions array in next.config.
AI-assisted analysis of vercel/next.js@34433fd12e (2026-08-19).
Data as JSON: /api/errors/979666ecebf6fb3f.
Report an issue: GitHub.
Appendix: source
Thrown at packages/next/src/server/config.ts:417
}
}
if (key === 'pageExtensions') {
if (!Array.isArray(value)) {
throw new Error(
`Specified pageExtensions is not an array of strings, found "${value}". Please update this config or remove it.`
)
}
if (!value.length) {
throw new Error(
`Specified pageExtensions is an empty array. Please update it with the relevant extensions or remove it.`
)
}
value.forEach((ext) => {
if (typeof ext !== 'string') {
throw new Error(
`Specified pageExtensions is not an array of strings, found "${ext}" of type "${typeof ext}". Please update this config or remove it.`
)
}
})
}
const defaultValue = (defaultConfig as Record<string, unknown>)[key]
if (
!!value &&
value.constructor === Object &&
typeof defaultValue === 'object'
) {
currentConfig[key] = {
...defaultValue,
...Object.keys(value).reduce<any>((c, k) => {
const v = value[k]
if (v !== undefined && v !== null) {View on GitHub (pinned to 34433fd12e)