remix-run/remix · error · CliError
RMX_ROUTE_OWNER_PLAN_UNRESOLVED
RMX_ROUTE_OWNER_PLAN_UNRESOLVED
Error message
Could not resolve owner plan for "${rawNode.name}". What it means
getRouteOwner resolves the owning file/directory for a route node. For a 'group' node it looks the route name up in `directoriesByRouteName`; if the map has no entry for that group's name, the owner plan cannot be resolved and this error is thrown.
Source
Thrown at packages/cli/src/lib/route-map.ts:215
? rawNode.name
: parentSegments.length === 0
? ROOT_ROUTE_NAME
: parentSegments.join('.')
let subtree = subtreesByRouteName.get(ownerRouteName)
if (subtree != null) {
return {
exists: subtree.actualEntryPath != null,
kind: 'controller',
path: subtree.actualEntryPath ?? subtree.entryDisplayPath,
}
}
if (rawNode.kind === 'group') {
let directory = directoriesByRouteName.get(rawNode.name)
if (directory == null) {
throw routeOwnerPlanUnresolved(rawNode.name)
}
return {
exists: directory.exists,
kind: 'directory',
path: directory.directoryPath,
}
}
throw routeOwnerPlanUnresolved(rawNode.name)
}
function assertRawRouteTree(value: unknown): RawRouteTreeNode[] {
if (!Array.isArray(value)) {
throw new Error('Route-map loader returned an invalid tree.')
}
return value.map((entry) => assertRawRouteTreeNode(entry))View on GitHub (pinned to 9696913134)
Solutions
- Regenerate the route map (re-run the CLI command / restart dev) so it matches current files
- Verify the group directory actually exists on disk under app/
- Check for hand-authored route-tree files that name groups inconsistently
Defensive patterns
Strategy: validation
Validate before calling
const groupDirsExist = new Set(await glob('app/**/'))
if (!groupDirs.has(`app/${groupName}`)) throw new Error('Group directory missing') Try / catch
catch (error) {
if (error instanceof Error && error.code === 'RMX_ROUTE_OWNER_PLAN_UNRESOLVED') {
// regenerate route map and retry
}
throw error
} Prevention
- Regenerate the route map after moving/renaming group directories
- Never hand-edit generated route trees
When it happens
Trigger: A route tree containing a group node whose name is absent from the directories map built from the app's file layout — typically a mismatch between the generated route map and the files on disk.
Common situations: Route map generated from a stale or different directory state; hand-edited route trees; moving/renaming group directories without regenerating the route map.
Related errors
- hmr must be provided
- hmr requires watch mode
- Resolved path escapes the allowed root: ${relativePath}
- Missing app/routes.ts path.
- Route module ${routesFile} must export a named "routes" valu
AI-assisted analysis of remix-run/remix@9696913134 (2026-08-27).
Data as JSON: /api/errors/4bcb33320fc93480.
Report an issue: GitHub.