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

  1. Fix the resource resolution (correct name in toResource, and a list route on the resource)
  2. Always pass `fallbackTo="/dashboard"` (or another always-valid route) as a safety net
  3. 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

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


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