{"record":{"id":"2028461a3eb919ec","repo":"gatsbyjs/gatsby","slug":"the-path-to-the-following-page-is-longer-than-the","errorCode":null,"errorMessage":"The path to the following page is longer than the supported limit on most operating systems and will cause an ENAMETOOLONG error. The path has been truncated to prevent this.\n\nOriginal Path: ${page.path}\n\nTruncated Path: ${truncatedPath}","messagePattern":"The path to the following page is longer than the supported limit on most operating systems and will cause an ENAMETOOLONG error\\. The path has been truncated to prevent this\\.\n\nOriginal Path: (.+?)\n\nTruncated Path: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/redux/actions/public.js","lineNumber":397,"sourceCode":"        page.component = `${page.component}?__contentFilePath=${splitPath[1]}`\n      }\n\n      pageComponentCache.set(originalPageComponent, page.component)\n    }\n  }\n\n  let internalComponentName\n  if (page.path === `/`) {\n    internalComponentName = `ComponentIndex`\n  } else {\n    internalComponentName = `Component${page.path}`\n  }\n\n  const invalidPathSegments = tooLongSegmentsInPath(page.path)\n\n  if (invalidPathSegments.length > 0) {\n    const truncatedPath = truncatePath(page.path)\n    report.warn(\n      report.stripIndent(`\n        The path to the following page is longer than the supported limit on most\n        operating systems and will cause an ENAMETOOLONG error. The path has been\n        truncated to prevent this.\n\n        Original Path: ${page.path}\n\n        Truncated Path: ${truncatedPath}\n      `)\n    )\n    page.path = truncatedPath\n  }\n\n  page.path = applyTrailingSlashOption(page.path, trailingSlash)\n\n  const internalPage: Page = {\n    internalComponentName,\n    path: page.path,","sourceCodeStart":379,"sourceCodeEnd":415,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/redux/actions/public.js#L379-L415","documentation":"In createPage validation, a path segment exceeds the OS filename length limit (per-segment check via tooLongSegmentsInPath). Such a path would produce an HTML file whose name causes ENAMETOOLONG, so Gatsby truncates the segment, warns with the original and truncated paths, and proceeds with the truncated route.","triggerScenarios":"Thrown at packages/gatsby/src/redux/actions/public.js:397 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Shorten the page path / slug in your source data before creating the page","Slugify and cap path segment length in createPage (e.g. slice the slug)","Accept Gatsby's truncation, but note internal links should use the truncated path"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}