{"record":{"id":"198ffb783abc1867","repo":"refinedev/refine","slug":"no-resource-is-found-navigation-to-fallbackto","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/remix-router/src/navigate-to-resource.ts","lineNumber":38,"sourceCode":"\n  const toResource = resource || resources.find((r) => r.list);\n\n  React.useEffect(() => {\n    if (toResource) {\n      if (!ran.current) {\n        const path = getToPath({\n          resource: toResource,\n          action: \"list\",\n          meta,\n        });\n\n        if (path) {\n          navigate(path, { replace: true });\n        }\n        ran.current = true;\n      }\n    } else if (fallbackTo) {\n      console.warn(`No resource is found. navigation to ${fallbackTo}.`);\n      navigate(fallbackTo, { replace: true });\n      ran.current = true;\n    }\n  }, [toResource, meta, navigate, getToPath]);\n\n  return null;\n};\n","sourceCodeStart":20,"sourceCodeEnd":46,"githubUrl":"https://github.com/refinedev/refine/blob/779d52a20e29b0307ac0df04d135beba434370dc/packages/remix-router/src/navigate-to-resource.ts#L20-L46","documentation":"Warned by `NavigateToResource` in @refinedev/remix-router when the target resource (from `toResource`/`meta` resolution) cannot be found in the resource list and a `fallbackTo` prop is provided. The component then navigates to `fallbackTo` with replace so the user isn't stranded on a dead route. It signals a resource-definition or naming mismatch rather than a crash.","triggerScenarios":"Rendering <NavigateToResource toResource=\"posts\" /> (or default) where \"posts\" is not in the <Refine resources> list (different name, undefined, or resource has no list route and no meta to resolve one), while `fallbackTo` is set.","commonSituations":"Renaming a resource but forgetting the index-page redirect; typo in toResource; resource whose list action was removed; auth-conditional resource registration.","solutions":["Ensure the resource name in `toResource` exactly matches a name in the `resources` array of <Refine>","Give the resource a `list` route or `meta` so a path can be resolved, or point `toResource` at a resource that has one","Keep `fallbackTo` pointing at a guaranteed-valid route (e.g. dashboard) as a safety net"],"exampleFix":"// before\n<Refine resources={[{ name: 'blog-posts', list: '/blog-posts' }]} />\n// index route\n<NavigateToResource toResource=\"posts\" fallbackTo=\"/dashboard\" />\n// after\n<NavigateToResource toResource=\"blog-posts\" fallbackTo=\"/dashboard\" />","handlingStrategy":"validation","validationCode":"const names = resources.map((r) => r.name);\nif (!names.includes('posts')) console.warn('NavigateToResource target missing from resources');","typeGuard":"const resourceExists = (name: string) =>\n  Boolean(resources.find((r) => r.name === name && (r.list || r.meta)));","tryCatchPattern":null,"preventionTips":["Centralize resource names as constants shared by <Refine> and NavigateToResource","Always set fallbackTo to a route that is guaranteed to render"],"tags":["navigation","resources","remix-router","refine"],"backgroundTag":"route-resource-not-found","analyzedSha":"779d52a20e29b0307ac0df04d135beba434370dc","analyzedAt":"2026-08-27T11:15:25.854Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}