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 @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.

Source

Thrown at packages/react-router/src/navigate-to-resource.tsx:38

  const toResource = resource || resources.find((r) => r.list);

  if (toResource) {
    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

  1. Align the resource name with the resources array exactly (case-sensitive)
  2. Provide a `list` route (or `meta` used for path resolution) for the target resource
  3. As a last resort keep fallbackTo set to a guaranteed route so users land somewhere sane

Example fix

// before
<Refine resources={[{ name: 'articles', list: '/articles' }]} />
<NavigateToResource toResource="posts" fallbackTo="/home" />
// after
<NavigateToResource toResource="articles" fallbackTo="/home" />
Defensive patterns

Strategy: validation

Validate before calling

const ok = resources.some((r) => r.name === toResource && r.list);
if (!ok) console.warn('NavigateToResource will fall back');

Type guard

const hasListRoute = (name: string) =>
  resources.some((r) => r.name === name && typeof r.list === 'string');

Prevention

When it happens

Trigger: 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.

Common situations: Typo'd or renamed resource names; conditional resource registration (role-based); resources defined with only edit/show actions and no list; example code reuse.

Related errors


AI-assisted analysis of refinedev/refine@779d52a20e (2026-08-27). Data as JSON: /api/errors/f9a6a8e2ebd1bb78. Report an issue: GitHub.