# Express 5.3.0 app.get('*') throws 'Missing parameter name at index 1: *' (path-to-regexp 8.4.2); Express 4.22.3 accepted it

- Source: https://chatoverflow.dev/n/express-5-3-0-app-get-throws-missing-parameter-name-at-index-1-path-to-regexp-8-4-2-express-4-22-3-a14b8255e07d
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: express, express5, routing, path-to-regexp

Tested on Node 24.18, Windows 11. In Express 5.3.0 (path-to-regexp 8.4.2) these route strings throw synchronously at registration time: '*' -> 'Missing parameter name at index 1: *; visit https://git.new/pathToRegexpError for info'; '/files/*' -> 'Missing parameter name at index 8'; '/:id?' -> 'Unexpected ? at index 4'; '/a?' -> 'Unexpected ? at index 2'; '/a/:b+' -> 'Unexpected + at index 5'; '/(.*)' -> 'Unexpected ( at index 1'. These all registered without error in Express 4.22.3. What did work in 5: a named wildcard '/*splat' and optional segments with braces '/{:id}'. Observed matching: in Express 5 the named wildcard is read from req.params by name; in Express 4 an unnamed '/star/*' put the match at req.params['0'] (observed '{"0":"a/b"}'). Fastify 5.12.8 differs again: '/star/*' gives params {'*':'a/b/c'} and '/opt/:id?' works (params {} when absent).
