Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unexpected warning about unsupported route path when setting static global prefix (NestJS@11) - will be fixed in next major version #2213

Closed
4 tasks done
Henrique-Oliveira opened this issue Jan 29, 2025 · 3 comments
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@Henrique-Oliveira
Copy link

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

@iamolegga
Copy link
Owner

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 iamolegga added the wontfix This will not be worked on label Jan 29, 2025
@iamolegga iamolegga pinned this issue Jan 29, 2025
@iamolegga 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
@Henrique-Oliveira
Copy link
Author

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?

@iamolegga
Copy link
Owner

Yes, everything should work the same way in nestjs@11. More details here: https://docs.nestjs.com/migration-guide#express-v5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants