{"record":{"id":"214e0cc50bce61a0","repo":"vercel/next.js","slug":"export-encountered-errors-on-failedpages-length","errorCode":null,"errorMessage":"Export encountered errors on ${failedPages.length} ${failedPages.length === 1 ? 'path' : 'paths'}:\n\t${failedPages.sort().join('\\n\\t')}","messagePattern":"Export encountered errors on (.+?) (.+?):\n\t(.+?)","errorType":"exception","errorClass":"ExportError","httpStatus":null,"severity":"error","filePath":"packages/next/src/export/index.ts","lineNumber":1054,"sourceCode":"                '/' + segmentFileSrc.slice(0, -RSC_SEGMENT_SUFFIX.length)\n              const segmentFilename =\n                convertSegmentPathToStaticExportFilename(segmentPath)\n              const segmentFileDest = join(segmentsDirDest, segmentFilename)\n              await fs.mkdir(dirname(segmentFileDest), { recursive: true })\n              await fs.copyFile(\n                join(segmentsDir, segmentFileSrc),\n                segmentFileDest\n              )\n            })\n          )\n        }\n      })\n    )\n  }\n\n  if (failedExportAttemptsByPage.size > 0) {\n    const failedPages = Array.from(failedExportAttemptsByPage.keys())\n    throw new ExportError(\n      `Export encountered errors on ${failedPages.length} ${failedPages.length === 1 ? 'path' : 'paths'}:\\n\\t${failedPages\n        .sort()\n        .join('\\n\\t')}`\n    )\n  }\n\n  await fs.writeFile(\n    join(distDir, EXPORT_DETAIL),\n    formatManifest({\n      version: 1,\n      outDirectory: outDir,\n      success: true,\n    }),\n    'utf8'\n  )\n\n  if (telemetry) {\n    await telemetry.flush()","sourceCodeStart":1036,"sourceCodeEnd":1072,"githubUrl":"https://github.com/vercel/next.js/blob/258b1c1bc05f7099816b88f70b7b3422b24a4b8d/packages/next/src/export/index.ts#L1036-L1072","documentation":"Final failure report in exportAppImpl: the export run collected failedExportAttemptsByPage entries — pages whose prerender/export attempts threw. It aggregates the failed pages, sorts them, and lists them (tab-indented) under this summary as the terminating error so the user sees exactly which paths did not export.","triggerScenarios":"Static export fails to prerender one or more pages.","commonSituations":"A page throws during prerendering when building with output: export.","solutions":["Fix the errors on the listed paths (see earlier build output) and re-run the export."],"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"}