-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
5.1.0 Throws error on route with a parameter in it #6458
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
Comments
Are you sure that this path is the problem? Don't you maybe have If you want to see which path causes the exception you can increase the stack trace limit (e.g. |
I am facing the same error with express.static, with previous version the code below worked fine but it no longer works with the 5.x version
|
try this instead
|
Through bisecting, the offending code in my app is
It was originally '/api/users/:nickname?', but when I updated to express 5.1.0, I changed the route path to '/api/users/{:nickname}' like the migration guide suggests. When that didn't work I got rid of the braces ('/api/users/:nickname') to make it a required parameter, but that still did not work.
Environment information
Version:
Platform:
Node.js version:
Any other relevant information:
What steps will reproduce the bug?
After trying a few arbitrary paths, it seems that any replaceable param in a 5.x router.get() path will do this.
The text was updated successfully, but these errors were encountered: