{"record":{"id":"47d3c74c52b1882f","repo":"remix-run/remix","slug":"rmx-route-owner-plan-unresolved","errorCode":"RMX_ROUTE_OWNER_PLAN_UNRESOLVED","errorMessage":"Could not resolve a route owner plan","messagePattern":"Could not resolve a route owner plan","errorType":"error_code","errorClass":"CliError","httpStatus":null,"severity":"error","filePath":"packages/cli/src/lib/errors.ts","lineNumber":123,"sourceCode":"    title: 'Could not find remote Remix skill data',\n  },\n  routeMapLoaderFailed: {\n    code: 'RMX_ROUTE_MAP_LOADER_FAILED',\n    title: 'Route-map loader failed',\n    fix: 'Check app/routes.ts and make sure it exports a named `routes` value with a valid route map.',\n  },\n  routeMapLoaderInvalidJson: {\n    code: 'RMX_ROUTE_MAP_LOADER_INVALID_JSON',\n    title: 'Route-map loader returned invalid JSON',\n    fix: 'Check app/routes.ts and make sure route-map loading does not write extra output.',\n  },\n  routeMapLoaderSignal: {\n    code: 'RMX_ROUTE_MAP_LOADER_SIGNAL',\n    title: 'Route-map loader exited from a signal',\n    fix: 'Check app/routes.ts for side effects or runtime issues and try again.',\n  },\n  routeOwnerPlanUnresolved: {\n    code: 'RMX_ROUTE_OWNER_PLAN_UNRESOLVED',\n    title: 'Could not resolve a route owner plan',\n  },\n  routesFileNotFound: {\n    code: 'RMX_ROUTES_FILE_NOT_FOUND',\n    title: 'Could not find app/routes.ts',\n    fix: 'Run this command inside a Remix app that has app/routes.ts.',\n  },\n  targetDirectoryNotEmpty: {\n    code: 'RMX_TARGET_DIRECTORY_NOT_EMPTY',\n    title: 'Target directory is not empty',\n    fix: 'Re-run with --force to continue.',\n  },\n  targetPathNotDirectory: {\n    code: 'RMX_TARGET_PATH_NOT_DIRECTORY',\n    title: 'Target path is not a directory',\n    fix: 'Choose a directory path for the new app target.',\n  },\n  unexpectedExtraArgument: {","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/remix-run/remix/blob/9696913134be3a4423513d2775f7b31d6917c049/packages/cli/src/lib/errors.ts#L105-L141","documentation":"An internal CLI operation could not determine an owning plan for a route (the plan that maps a route to the package/module responsible for it). This is an internal resolution failure, typically a symptom of an inconsistent route map or an unexpected route shape rather than user code.","triggerScenarios":"CLI commands that need per-route ownership (e.g. codemods, route analysis) encountering a route entry whose file/path cannot be matched to a known plan.","commonSituations":"Hand-edited route maps with paths pointing outside the app directory, files missing on disk, or mismatched CLI/app versions after a partial upgrade.","solutions":["Verify every entry in app/routes.ts points to an existing route file inside your app.","Re-run `remix routes` (or the failing command) to confirm the route map loads cleanly (no errors 420-422).","Update the `remix` CLI and app packages to matching versions.","If it persists, report it with your app/routes.ts contents as a likely internal bug."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { access } from 'node:fs/promises'\n\nfor (let route of routes) {\n  await access(path.join('app', route.file)) // throws early if a route file is missing\n}","typeGuard":null,"tryCatchPattern":"try {\n  await analyzeRoutes()\n} catch (error) {\n  if (error.code === 'RMX_ROUTE_OWNER_PLAN_UNRESOLVED') {\n    // audit route map entries, then report upstream if resolved entries still fail\n  }\n}","preventionTips":["Validate every route `file` exists.","Keep CLI and app package versions in sync."],"tags":["cli","routes","internal"],"backgroundTag":"route-config-invalid","analyzedSha":"9696913134be3a4423513d2775f7b31d6917c049","analyzedAt":"2026-08-27T19:55:01.024Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}