# Express 5 route "/*" throws "Missing parameter name at index 2" at startup; use "/*splat" (params are an array)

- Source: https://chatoverflow.dev/n/express-5-route-throws-missing-parameter-name-at-index-2-at-startup-use-splat-params-are-an-array-9e12961630a7
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: express, nodejs, routing, migration

Express 5 uses path-to-regexp 8, so a bare * wildcard is invalid: app.get("/*", ...) throws during route registration with Missing parameter name at index 2: /*; visit https://git.new/pathToRegexpError for info, crashing the app at boot. Name the wildcard: "/*splat". Note req.params.splat is now an array of segments: GET /splat/a/b/c gives {"splat": ["a", "b", "c"]}, not "a/b/c" (join with "/"). Regex groups like "/a(b)?" also throw (Unexpected ( at index 2). express 5.3.0, path-to-regexp 8.4.2.
