{"record":{"id":"320cfc499cdfb989","repo":"remix-run/remix","slug":"route-map-loader-returned-a-route-node-without-a-v","errorCode":null,"errorMessage":"Route-map loader returned a route node without a valid name.","messagePattern":"Route-map loader returned a route node without a valid name\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/lib/route-map.ts","lineNumber":247,"sourceCode":"  if (!Array.isArray(value)) {\n    throw new Error('Route-map loader returned an invalid tree.')\n  }\n\n  return value.map((entry) => assertRawRouteTreeNode(entry))\n}\n\nfunction assertRawRouteTreeNode(value: unknown): RawRouteTreeNode {\n  if (typeof value !== 'object' || value == null) {\n    throw new Error('Route-map loader returned an invalid route node.')\n  }\n\n  let key = Reflect.get(value, 'key')\n  let name = Reflect.get(value, 'name')\n  let kind = Reflect.get(value, 'kind')\n  let children = Reflect.get(value, 'children')\n\n  if (typeof key !== 'string' || typeof name !== 'string') {\n    throw new Error('Route-map loader returned a route node without a valid name.')\n  }\n\n  if (kind !== 'group' && kind !== 'route') {\n    throw new Error(`Route-map loader returned an unknown node kind for \"${name}\".`)\n  }\n\n  if (!Array.isArray(children)) {\n    throw new Error(`Route-map loader returned invalid children for \"${name}\".`)\n  }\n\n  if (kind === 'group') {\n    return {\n      children: children.map((child) => assertRawRouteTreeNode(child)),\n      key,\n      kind,\n      name,\n    }\n  }","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/remix-run/remix/blob/9696913134be3a4423513d2775f7b31d6917c049/packages/cli/src/lib/route-map.ts#L229-L265","documentation":"Every route node must carry string `key` and `name` fields. If either is missing or not a string, this error is thrown during tree validation in the main process.","triggerScenarios":"A tree node where Reflect.get(value,'key') or 'name' returns a non-string — again normally a worker/spawner version mismatch or malformed mock, since real worker output always includes these.","commonSituations":"Partial upgrade of the CLI leaving an older worker emitting a different node schema; test fixtures missing key/name fields.","solutions":["Reinstall to a consistent remix/CLI version set","Fix test fixtures to include `key` and `name` strings on every node","Verify with `pnpm why remix` that only one version is installed"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"tree.every(n => typeof n.key === 'string' && typeof n.name === 'string')","typeGuard":"function hasNames(n: unknown): n is { key: string; name: string } {\n  return typeof (n as any)?.key === 'string' && typeof (n as any)?.name === 'string'\n}","tryCatchPattern":null,"preventionTips":["Fixture nodes must include key and name strings","Lock remix versions to avoid schema drift","Add a smoke test that loads a real route map"],"tags":["routes","worker","internal","validation"],"backgroundTag":"invalid-worker-response","analyzedSha":"9696913134be3a4423513d2775f7b31d6917c049","analyzedAt":"2026-08-27T19:55:01.024Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}