{"record":{"id":"6198968fbdfa38f5","repo":"vercel/next.js","slug":"specified-pageextensions-is-an-empty-array-please","errorCode":null,"errorMessage":"Specified pageExtensions is an empty array. Please update it with the relevant extensions or remove it.","messagePattern":"Specified pageExtensions is an empty array\\. Please update it with the relevant extensions or remove it\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/config.ts","lineNumber":410,"sourceCode":"        }\n        // make sure distDir isn't an empty string as it can result in the provided\n        // directory being deleted in development mode\n        if (userDistDir.length === 0) {\n          throw new Error(\n            `Invalid distDir provided, distDir can not be an empty string. Please remove this config or set it to undefined`\n          )\n        }\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 &&","sourceCodeStart":392,"sourceCodeEnd":428,"githubUrl":"https://github.com/vercel/next.js/blob/34433fd12ee8074ea3f47af9f36255c7390d0301/packages/next/src/server/config.ts#L392-L428","documentation":"Config validation in assignDefaultsAndValidate: pageExtensions is an array but has zero entries. With no extensions the page-resolution glob matches nothing and every route disappears, so an empty list is rejected with instructions to add the relevant extensions or remove the option to use defaults.","triggerScenarios":"pageExtensions is configured as an empty array.","commonSituations":"pageExtensions: [] in next.config leaves no resolvable page extensions.","solutions":["Add at least one extension to pageExtensions or remove the option."],"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"}