{"record":{"id":"3448da4dfd3764b4","repo":"remix-run/react-router","slug":"no-result-found-for-routeid-routeid","errorCode":null,"errorMessage":"No result found for routeId \"${routeId}\"","messagePattern":"No result found for routeId \"(.+?)\"","errorType":"exception","errorClass":"SingleFetchNoResultError","httpStatus":null,"severity":"error","filePath":"packages/react-router/lib/dom/ssr/single-fetch.tsx","lineNumber":753,"sourceCode":"      revalidate,\n      reload,\n      replace,\n      status,\n    } = result.redirect;\n    throw redirect(location, {\n      status,\n      headers: {\n        // Three R's of redirecting (lol Veep)\n        ...(revalidate ? { \"X-Remix-Revalidate\": \"yes\" } : null),\n        ...(reload ? { \"X-Remix-Reload-Document\": \"yes\" } : null),\n        ...(replace ? { \"X-Remix-Replace\": \"yes\" } : null),\n      },\n    });\n  }\n\n  let routeResult = result.routes[routeId];\n  if (routeResult == null) {\n    throw new SingleFetchNoResultError(\n      `No result found for routeId \"${routeId}\"`,\n    );\n  } else if (\"error\" in routeResult) {\n    throw routeResult.error;\n  } else if (\"data\" in routeResult) {\n    return routeResult.data;\n  } else {\n    throw new Error(`Invalid response found for routeId \"${routeId}\"`);\n  }\n}\n\nfunction createDeferred<T = unknown>() {\n  let resolve: (val: T) => Promise<void>;\n  let reject: (error: unknown) => Promise<void>;\n  let promise = new Promise<T>((res, rej) => {\n    resolve = async (val: T) => {\n      res(val);\n      try {","sourceCodeStart":735,"sourceCodeEnd":771,"githubUrl":"https://github.com/remix-run/react-router/blob/6beaca39526d5716c3c112ebb0782765baa5a9ce/packages/react-router/lib/dom/ssr/single-fetch.tsx#L735-L771","documentation":"In single-fetch mode the server returns a map of per-route results; this error is thrown when the client asks for `result.routes[routeId]` for a route it is revalidating and the entry is `null`/`undefined`. It uses the dedicated `SingleFetchNoResultError` class because the router and middleware logic specifically detect it (e.g., to swap in middleware errors). In practice the server response simply did not include data for a route the client expected to have results for.","triggerScenarios":"A clientLoader calling `serverLoader()` for a route that was not part of the server's single-fetch request; version skew where the client revalidates a route the freshly-deployed server no longer runs; a custom server/`handleRequest` that filters which loader results get serialized into the `.data` response; fetcher loads racing a navigation that removed the route.","commonSituations":"Hitting the error immediately after a deploy that added/removed routes while the browser had the app open; wrapping the server request pipeline with custom logic that drops route results; using `patchRoutesOnNavigation`/lazy route discovery with a server that does not know the new route yet.","solutions":["Hard reload to resync the client's route set with the server after a deploy.","If you customize `handleRequest` or the single-fetch serialization, make sure every route id the client revalidates appears in the returned routes map.","Only call `serverLoader()` from routes whose loader actually ran on the server (routes present in the matched request).","Reproduce with the `.data` request visible in the network tab and compare the route ids in the payload against the ids of matched routes."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"export function ErrorBoundary() {\n  const error = useRouteError();\n  if (error instanceof Error && error.message.includes(\"No result found for routeId\")) {\n    return <Link reloadDocument to={location.pathname}>Reload</Link>;\n  }\n  throw error;\n}","preventionTips":["Only call serverLoader() from routes included in the current server request.","Don't filter per-route results out of the single-fetch response in custom servers.","Hard reload after deploys that change the route tree."],"tags":["single-fetch","loader-data","hydration","version-skew"],"backgroundTag":"missing-response-payload-key","analyzedSha":"6beaca39526d5716c3c112ebb0782765baa5a9ce","analyzedAt":"2026-08-18T18:04:14.938Z","contentChangedAt":"2026-08-18T18:04:14.938Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}