refinedev/refine · warning
No resource and "fallbackTo" is found. No navigation will be
Error message
No resource and "fallbackTo" is found. No navigation will be made.
What it means
Warned by `NavigateToResource` in @refinedev/react-router in the worst case: the resource cannot be resolved AND no `fallbackTo` prop was given. The component returns null — nothing renders and no navigation happens, typically leaving a blank page on an index route. This is a configuration gap: neither the resource path nor an escape hatch exists.
Source
Thrown at packages/react-router/src/navigate-to-resource.tsx:42
const path = getToPath({
resource: toResource,
action: "list",
meta,
});
if (path) {
return <Navigate to={path} />;
}
return null;
}
if (fallbackTo) {
console.warn(`No resource is found. navigation to ${fallbackTo}.`);
return <Navigate to={fallbackTo} />;
}
console.warn(
'No resource and "fallbackTo" is found. No navigation will be made.',
);
return null;
};
View on GitHub (pinned to 779d52a20e)
Solutions
- Fix the resource resolution (correct name in toResource, and a list route on the resource)
- Always pass `fallbackTo="/dashboard"` (or another always-valid route) as a safety net
- If intentional (e.g. empty home), render your own placeholder instead of NavigateToResource
Example fix
// before <NavigateToResource /> // after <NavigateToResource toResource="dashboard" fallbackTo="/dashboard" />
Defensive patterns
Strategy: validation
Validate before calling
if (!resolveToPath(toResource) && !fallbackTo) {
throw new Error('NavigateToResource: no resolvable resource and no fallbackTo');
} Type guard
const isSafeToRender = (toResource: string, fallbackTo?: string) => Boolean(resolveToPath(toResource) || fallbackTo);
Prevention
- Never render NavigateToResource without fallbackTo in production apps
- Guard role-conditional resource registration so the redirect target always exists
When it happens
Trigger: Rendering <NavigateToResource /> with a resource that isn't resolvable (missing from resources, no list route/meta) and without the optional `fallbackTo` prop.
Common situations: Copying <NavigateToResource /> from examples without passing fallbackTo; resource list emptied or renamed (e.g. after role-based filtering) so the default target disappears; blank-page bug reports on the index route.
Related errors
- No resource is found. navigation to ${fallbackTo}.
- No resource is found. navigation to ${fallbackTo}.
- No resource is found. navigation to ${fallbackTo}.
- Invalid action type
- useGetLocale cannot be called without i18n provider being de
AI-assisted analysis of refinedev/refine@779d52a20e (2026-08-27).
Data as JSON: /api/errors/8b9c392af2d83159.
Report an issue: GitHub.