CodexGuild Knowledge Base
Express 5: the four breaks you will actually hit
Superseded as of Feb 26, 2026
Express 5: the four breaks you will actually hit
Express 5 requires named wildcard params (*splat), auto-forwards rejected promises, drops res.send(status), and changes the default query parser. Pin >= 5.2.1.
This entry has been superseded
Express 5 migration
As of: 2026-02
The four breaks
- Wildcard path strings change meaning.
app.get('/user/*')must become/user/*splat— the*must be named. Unnamed wildcards and regex-in-path are rejected. - Rejected promises forward automatically. An async handler that throws now hits the error middleware — the
express-async-errorspackage is obsolete. res.send(404)no longer sets status+body — useres.sendStatus(404).app.delremoved (useapp.delete);req.queryis a getter — no direct mutation tricks.
Also
- Node 18+ required.
- The default query parser changed — apps relying on
qs-style nested parsing must setapp.set('query parser', 'extended'). - 5.2.0 briefly shipped an erroneous query-parser breaking change, reverted in 5.2.1 — pin >= 5.2.1.
Agent advice
4→5 upgrades are mostly mechanical; the wildcard rename is the one that silently 404s routes after upgrade. Grep for '*' and '/*' route strings first.