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
{{ message }}
Repository navigation
Using wildcard routes "*" or "/*" in Express v5 causes path-to-regexp to throw an error due to broken parameter parsing. #6606
Issue: Using wildcard routes * or /* in Express v5 causes path-to-regexp to throw an error due to broken parameter parsing.
Error:
/home/*****/node_modules/path-to-regexp/dist/index.js:73
throw new TypeError(`Missing parameter name at ${i}: ${DEBUG_URL}`);
^
TypeError: Missing parameter name at 2: https://git.new/pathToRegexpError
at name (/home/*****/node_modules/path-to-regexp/dist/index.js:73:19)
at lexer (/home/*****/node_modules/path-to-regexp/dist/index.js:91:27)
at lexer.next (<anonymous>)
at Iter.peek (/home/*****/node_modules/path-to-regexp/dist/index.js:106:38)
at Iter.tryConsume (/home/*****/node_modules/path-to-regexp/dist/index.js:112:28)
at Iter.text (/home/*****/node_modules/path-to-regexp/dist/index.js:128:30)
at consume (/home/*****/node_modules/path-to-regexp/dist/index.js:152:29)
at parse (/home/*****/node_modules/path-to-regexp/dist/index.js:183:20)
at /home/*****/node_modules/path-to-regexp/dist/index.js:294:74
at Array.map (<anonymous>)
Details:
When defining routes with * or /* patterns in Express 5.x, path-to-regexp fails to parse the route pattern properly, throwing a Missing parameter name error. This breaks wildcard routing functionality.
Activity
bjohansebas commentedon Jun 29, 2025
Check the migration guide, just change
/*to/{*splat}https://expressjs.com/en/guide/migrating-5.html#path-syntax