refinedev/refine · warning
No resource is found. navigation to ${fallbackTo}.
Error message
No resource is found. navigation to ${fallbackTo}. What it means
Warned by `NavigateToResource` in the Next.js App Router package when the requested resource cannot be resolved to a path (not in resources, or no list route/meta) and a `fallbackTo` prop exists. The component then `replace()`s to fallbackTo. Same semantics as the react-router/remix variants — a resource-definition or naming mismatch, softened by the fallback.
Source
Thrown at packages/nextjs-router/src/app/navigate-to-resource.tsx:41
[resource, resources],
);
React.useEffect(() => {
if (toResource) {
if (!ran.current) {
const path = getToPath({
resource: toResource,
action: "list",
meta,
});
if (path) {
replace(path);
}
ran.current = true;
}
} else if (fallbackTo) {
console.warn(`No resource is found. navigation to ${fallbackTo}.`);
replace(fallbackTo);
ran.current = true;
}
}, [toResource, replace, meta, getToPath]);
return null;
};
View on GitHub (pinned to 779d52a20e)
Solutions
- Match `toResource` (or the default first resource with a list) exactly to a `resources` entry name
- Add `list: '/path'` or `meta: { route: ... }` to the resource so path resolution succeeds
- Keep fallbackTo pointing at an always-valid route such as the dashboard
Example fix
// before
<Refine resources={[{ name: 'products', list: '/products' }]} />
// app/page.tsx
<NavigateToResource toResource="product" fallbackTo="/dashboard" />
// after
<NavigateToResource toResource="products" fallbackTo="/dashboard" /> Defensive patterns
Strategy: validation
Validate before calling
if (!resources.some((r) => r.name === target && r.list)) {
console.warn(`Resource ${target} unresolvable — fallbackTo will be used`);
} Type guard
const canResolve = (name: string) => resources.some((r) => r.name === name && (r.list ?? r.meta?.route));
Prevention
- Keep an always-present dashboard route as fallbackTo
- Add a smoke test rendering the index page to catch blank redirects in CI
When it happens
Trigger: Rendering <NavigateToResource /> on an app-router index page where the default/`toResource` resource is absent from the <Refine resources> definitions (misnamed, missing list route, or no meta), with `fallbackTo` provided.
Common situations: Next.js App Router refine apps where the root page redirects to a resource list; resource renamed during refactors; index page copied from an example with different resource names.
Related errors
- No resource is found. navigation to ${fallbackTo}.
- No resource is found. navigation to ${fallbackTo}.
- No resource and "fallbackTo" is found. No navigation will be
- 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/d6ab5c96222e2110.
Report an issue: GitHub.