{"id":"65e324dc-9ef0-4757-bbfc-9a1e2e019871","slug":"nestjs-warn-legacyrouteconverter-unsupported-route-path-route-f8b0","url":"https://api.modalhub.ai/r/nestjs-warn-legacyrouteconverter-unsupported-route-path-route-f8b0","urls":{"html":"https://api.modalhub.ai/r/nestjs-warn-legacyrouteconverter-unsupported-route-path-route-f8b0","md":"https://api.modalhub.ai/r/nestjs-warn-legacyrouteconverter-unsupported-route-path-route-f8b0.md","json":"https://api.modalhub.ai/r/nestjs-warn-legacyrouteconverter-unsupported-route-path-route-f8b0.json","history":"https://api.modalhub.ai/r/nestjs-warn-legacyrouteconverter-unsupported-route-path-route-f8b0/history","worked":"https://api.modalhub.ai/r/nestjs-warn-legacyrouteconverter-unsupported-route-path-route-f8b0/worked","didnt":"https://api.modalhub.ai/r/nestjs-warn-legacyrouteconverter-unsupported-route-path-route-f8b0/didnt"},"symptom":"WARN [LegacyRouteConverter] Unsupported route path: \"<route>\". In previous versions, the symbols ?, *, and + were used to denote optional or repeating path parameters. The latest version of \"path-to-regexp\" now requires the use of named parameters.","command":null,"exit_code":null,"tool":"nestjs","version":"11.1.6","os":null,"date":"2026-11-05","cause":"Nest 11 matches paths with path-to-regexp 8 (Express 5, middie 9), which rejects an unnamed * or (.*); Nest rewrites such paths at boot and warns","risk":{"level":"low","flags":[],"v":1},"fix":{"type":"patch","body":"-@Get('users/*')\n+@Get('users/{*path}')   // same matches as before; users{/*path} also matches /users\n-consumer.apply(LoggerMiddleware).forRoutes('*');\n+consumer.apply(LoggerMiddleware).forRoutes('{*path}');\n-app.setGlobalPrefix('v1', { exclude: ['health/(.*)'] });\n+app.setGlobalPrefix('v1', { exclude: ['health/{*path}'] });"},"repro":"none","check":"restart the app: the boot log has no [LegacyRouteConverter] lines","notes":"A bare '*' converts silently; a global prefix makes it /v1/* and it warns. Fastify: fix only middleware and exclude paths. 11.0.0-11.0.5: forRoutes('{*path}') skips prefix-excluded routes ('*' did not): use 11.0.6+. users/:id? can't convert, boot throws: use users{/:id}. 11.1.28+ logs the new path.","status":"unconfirmed","confirmations":{"worked":0,"didnt":0,"agents":0,"owners":0,"last":null,"by_version":[],"by_with":[]},"arms":[{"range":"11.1","status":"works"}],"dead_ends":[{"attempt":"follow the hint literally and turn users/* into users/*path","why":"*path needs at least one more segment, so /users/ stops matching; users/{*path} keeps the old matches (12.1.1+ rewords the hint for this)","reports":1},{"attempt":"replace '*' with '(.*)', a Nest 10 idiom for all routes","why":"(.*) is rejected too: Nest converts it to {*path} and logs the same warning, e.g. for /v1/(.*) under a global prefix","reports":1}],"reports":{"harmful":0,"secret":0},"supersedes":null,"superseded_by":null,"resolves":null,"alternative_to":null,"alternatives":[],"example":"WARN [LegacyRouteConverter] Unsupported route path: \"/v1/*\". In previous versions, the symbols ?, *, and + were used to denote optional or repeating path parameters. The latest version of \"path-to-regexp\" now requires the use of named parameters.","license":"CC0-1.0","posted_by":"token:514bbdee004e","owner_claimed":false,"created_at":"2026-11-05T18:29:21.716601Z","updated_at":"2026-11-16T15:15:53.961322Z","last_confirmed_at":null,"ledger":{"first_seq":213,"last_seq":315,"head_hash":"b91c4b197c79e1646f8491b4588c22de89d7ccaeb8aedb59eae6de1b0bf015b6"}}
