{"record":{"id":"f9a6a8e2ebd1bb78","repo":"refinedev/refine","slug":"no-resource-is-found-navigation-to-fallbackto-f9a6a8","errorCode":null,"errorMessage":"No resource is found. navigation to ${fallbackTo}.","messagePattern":"No resource is found\\. navigation to (.+?)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/react-router/src/navigate-to-resource.tsx","lineNumber":38,"sourceCode":"\n  const toResource = resource || resources.find((r) => r.list);\n\n  if (toResource) {\n    const path = getToPath({\n      resource: toResource,\n      action: \"list\",\n      meta,\n    });\n\n    if (path) {\n      return <Navigate to={path} />;\n    }\n\n    return null;\n  }\n\n  if (fallbackTo) {\n    console.warn(`No resource is found. navigation to ${fallbackTo}.`);\n    return <Navigate to={fallbackTo} />;\n  }\n\n  console.warn(\n    'No resource and \"fallbackTo\" is found. No navigation will be made.',\n  );\n  return null;\n};\n","sourceCodeStart":20,"sourceCodeEnd":47,"githubUrl":"https://github.com/refinedev/refine/blob/779d52a20e29b0307ac0df04d135beba434370dc/packages/react-router/src/navigate-to-resource.tsx#L20-L47","documentation":"Warned by `NavigateToResource` in @refinedev/react-router when the target resource cannot be resolved to a navigation path but a `fallbackTo` prop is set; the component then renders `<Navigate to={fallbackTo} />`. It indicates the resource named by `toResource` (or the first resource fallback) isn't registered with a resolvable list route.","triggerScenarios":"Using <NavigateToResource toResource=\"X\" fallbackTo=\"/safe\" /> where X is not among <Refine resources> names, or X exists but has neither a `list` route nor resolvable `meta`, so getToPath returns undefined.","commonSituations":"Typo'd or renamed resource names; conditional resource registration (role-based); resources defined with only edit/show actions and no list; example code reuse.","solutions":["Align the resource name with the resources array exactly (case-sensitive)","Provide a `list` route (or `meta` used for path resolution) for the target resource","As a last resort keep fallbackTo set to a guaranteed route so users land somewhere sane"],"exampleFix":"// before\n<Refine resources={[{ name: 'articles', list: '/articles' }]} />\n<NavigateToResource toResource=\"posts\" fallbackTo=\"/home\" />\n// after\n<NavigateToResource toResource=\"articles\" fallbackTo=\"/home\" />","handlingStrategy":"validation","validationCode":"const ok = resources.some((r) => r.name === toResource && r.list);\nif (!ok) console.warn('NavigateToResource will fall back');","typeGuard":"const hasListRoute = (name: string) =>\n  resources.some((r) => r.name === name && typeof r.list === 'string');","tryCatchPattern":null,"preventionTips":["Derive toResource from the same constant used in the resources array","Pass fallbackTo defensively even when you believe resolution will succeed"],"tags":["navigation","react-router","resources","refine"],"backgroundTag":"route-resource-not-found","analyzedSha":"779d52a20e29b0307ac0df04d135beba434370dc","analyzedAt":"2026-08-27T11:15:25.854Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}