-
if path-to-regexp is not supported by new version then what is the new way to use it? TypeError: Unexpected ? at 3, expected END: https://git.new/pathToRegexpError |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can find more information about breaking changes (including path route matching) and migration to Express 5 in the official migration guide. |
Beta Was this translation helpful? Give feedback.
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.