You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug is related only to current library or I've tested the same behaviour with the built-in logger and this is not a bug of NestJS.
What is the current behavior?
When setting a static global prefix (e.g., app.setGlobalPrefix('v1')), I receive the following warning:
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. For example, instead of using a route like /users/ to capture all routes starting with "/users", you should use /users/*path. For more details, refer to the migration guide. Attempting to auto-convert...
What is the expected behavior?
When setting a static global prefix (e.g., app.setGlobalPrefix('v1')), no warnings should appear related with routes.
Please provide minimal example repo, not code snippet. Without example repo this issue will be closed.
As this library supports older nestjs version we still use deprecated express path syntax. In the next major nestjs and nestjs-pino versions, I will update the syntax
iamolegga
changed the title
[BUG] Unexpected warning about unsupported route path when setting static global prefix
[BUG] Unexpected warning about unsupported route path when setting static global prefix (NestJS@11) - will be fixed in next major version
Jan 29, 2025
As this library supports older nestjs version we still use deprecated express path syntax. In the next major nestjs and nestjs-pino versions, I will update the syntax
This means that everything should work the same way even using the latest NestJs v11? Is just warnings that we are getting?
What is the current behavior?
When setting a static global prefix (e.g., app.setGlobalPrefix('v1')), I receive the following warning:
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. For example, instead of using a route like /users/ to capture all routes starting with "/users", you should use /users/*path. For more details, refer to the migration guide. Attempting to auto-convert...
What is the expected behavior?
When setting a static global prefix (e.g., app.setGlobalPrefix('v1')), no warnings should appear related with routes.
Please provide minimal example repo, not code snippet. Without example repo this issue will be closed.
https://github.com/Henrique-Oliveira/pino-route-error
Please mention other relevant information such as Node.js version and Operating System.
Node v22.13.1, NestJs v11 and running on macOS
The text was updated successfully, but these errors were encountered: