Skip to content

if path-to-regexp is not supported by new version then what is the new way to use it? #6440

Answered by krzysdz
Abhi00705 asked this question in Q&A
Discussion options

You must be logged in to vote

path-to-regexp is supported, but it has been updated from 0.1.x to 8.0.0 and this is a breaking change. As explained on the page linked in the error message, some operators, such as ?, no longer exist. Now optional segments must be enclosed in braces {}.

You can find more information about breaking changes (including path route matching) and migration to Express 5 in the official migration guide.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bjohansebas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants