remix-run/remix · error · CliError
RMX_ROUTE_OWNER_PLAN_UNRESOLVED
RMX_ROUTE_OWNER_PLAN_UNRESOLVED
Error message
Could not resolve a route owner plan
What it means
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.
Source
Thrown at packages/cli/src/lib/errors.ts:123
title: 'Could not find remote Remix skill data',
},
routeMapLoaderFailed: {
code: 'RMX_ROUTE_MAP_LOADER_FAILED',
title: 'Route-map loader failed',
fix: 'Check app/routes.ts and make sure it exports a named `routes` value with a valid route map.',
},
routeMapLoaderInvalidJson: {
code: 'RMX_ROUTE_MAP_LOADER_INVALID_JSON',
title: 'Route-map loader returned invalid JSON',
fix: 'Check app/routes.ts and make sure route-map loading does not write extra output.',
},
routeMapLoaderSignal: {
code: 'RMX_ROUTE_MAP_LOADER_SIGNAL',
title: 'Route-map loader exited from a signal',
fix: 'Check app/routes.ts for side effects or runtime issues and try again.',
},
routeOwnerPlanUnresolved: {
code: 'RMX_ROUTE_OWNER_PLAN_UNRESOLVED',
title: 'Could not resolve a route owner plan',
},
routesFileNotFound: {
code: 'RMX_ROUTES_FILE_NOT_FOUND',
title: 'Could not find app/routes.ts',
fix: 'Run this command inside a Remix app that has app/routes.ts.',
},
targetDirectoryNotEmpty: {
code: 'RMX_TARGET_DIRECTORY_NOT_EMPTY',
title: 'Target directory is not empty',
fix: 'Re-run with --force to continue.',
},
targetPathNotDirectory: {
code: 'RMX_TARGET_PATH_NOT_DIRECTORY',
title: 'Target path is not a directory',
fix: 'Choose a directory path for the new app target.',
},
unexpectedExtraArgument: {View on GitHub (pinned to 9696913134)
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.
Defensive patterns
Strategy: validation
Validate before calling
import { access } from 'node:fs/promises'
for (let route of routes) {
await access(path.join('app', route.file)) // throws early if a route file is missing
} Try / catch
try {
await analyzeRoutes()
} catch (error) {
if (error.code === 'RMX_ROUTE_OWNER_PLAN_UNRESOLVED') {
// audit route map entries, then report upstream if resolved entries still fail
}
} Prevention
- Validate every route `file` exists.
- Keep CLI and app package versions in sync.
When it happens
Trigger: 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.
Common situations: Hand-edited route maps with paths pointing outside the app directory, files missing on disk, or mismatched CLI/app versions after a partial upgrade.
Related errors
- Missing app/routes.ts path.
- hmr must be provided
- hmr requires watch mode
- Route module ${routesFile} must export a named "routes" valu
- Route-map loader returned an invalid tree.
AI-assisted analysis of remix-run/remix@9696913134 (2026-08-27).
Data as JSON: /api/errors/47d3c74c52b1882f.
Report an issue: GitHub.