TypeError: Missing parameter name at 1 (path-to-regexp)
An Express 5 (path-to-regexp v8) route uses old wildcard syntax like '*' or '/:id?'.
Seen on:
Node.js
Meaning
Express 5 changed path syntax: wildcards must be named ('/*splat'), optional params use braces ('/{:id}'), and special characters in paths need escaping.
Common causes
- app.get('*', …) or '/api/*' in Express 5
- Optional parameters with ?
- Upgraded to Express 5 or a library using path-to-regexp 8
⚡ Quick fix
- Use named wildcards: app.get('/*splat', …)
- Optional segments: '/users{/:id}'
- Check the Express 5 migration guide
Detailed fix by platform
Node.js
app.get('/*splat', (req, res) => res.sendFile(indexHtml));
How to diagnose
- Route — Which path string?
- Version — Express 5?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026