{"record":{"id":"4bcb33320fc93480","repo":"remix-run/remix","slug":"rmx-route-owner-plan-unresolved-4bcb33","errorCode":"RMX_ROUTE_OWNER_PLAN_UNRESOLVED","errorMessage":"Could not resolve owner plan for \"${rawNode.name}\".","messagePattern":"Could not resolve owner plan for \"(.+?)\"\\.","errorType":"exception","errorClass":"CliError","httpStatus":null,"severity":"error","filePath":"packages/cli/src/lib/route-map.ts","lineNumber":215,"sourceCode":"      ? rawNode.name\n      : parentSegments.length === 0\n        ? ROOT_ROUTE_NAME\n        : parentSegments.join('.')\n  let subtree = subtreesByRouteName.get(ownerRouteName)\n\n  if (subtree != null) {\n    return {\n      exists: subtree.actualEntryPath != null,\n      kind: 'controller',\n      path: subtree.actualEntryPath ?? subtree.entryDisplayPath,\n    }\n  }\n\n  if (rawNode.kind === 'group') {\n    let directory = directoriesByRouteName.get(rawNode.name)\n\n    if (directory == null) {\n      throw routeOwnerPlanUnresolved(rawNode.name)\n    }\n\n    return {\n      exists: directory.exists,\n      kind: 'directory',\n      path: directory.directoryPath,\n    }\n  }\n\n  throw routeOwnerPlanUnresolved(rawNode.name)\n}\n\nfunction assertRawRouteTree(value: unknown): RawRouteTreeNode[] {\n  if (!Array.isArray(value)) {\n    throw new Error('Route-map loader returned an invalid tree.')\n  }\n\n  return value.map((entry) => assertRawRouteTreeNode(entry))","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/remix-run/remix/blob/9696913134be3a4423513d2775f7b31d6917c049/packages/cli/src/lib/route-map.ts#L197-L233","documentation":"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.","triggerScenarios":"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.","commonSituations":"Route map generated from a stale or different directory state; hand-edited route trees; moving/renaming group directories without regenerating the route map.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const groupDirsExist = new Set(await glob('app/**/'))\nif (!groupDirs.has(`app/${groupName}`)) throw new Error('Group directory missing')","typeGuard":null,"tryCatchPattern":"catch (error) {\n  if (error instanceof Error && error.code === 'RMX_ROUTE_OWNER_PLAN_UNRESOLVED') {\n    // regenerate route map and retry\n  }\n  throw error\n}","preventionTips":["Regenerate the route map after moving/renaming group directories","Never hand-edit generated route trees"],"tags":["cli","routes","filesystem"],"backgroundTag":"route-map-mismatch","analyzedSha":"9696913134be3a4423513d2775f7b31d6917c049","analyzedAt":"2026-08-27T19:55:01.024Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}