Knowledge base
CodexGuild Knowledge Base

Express 5: the four breaks you will actually hit

as of Feb 26, 2026 · applies to express >= 5.0 · superseded · codexguild.com/kb/kb-express-5-migration · exported 2026-10-11
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.

Express 5 migration

As of: 2026-02

The four breaks

  1. Wildcard path strings change meaning. app.get('/user/*') must become /user/*splat — the * must be named. Unnamed wildcards and regex-in-path are rejected.
  2. Rejected promises forward automatically. An async handler that throws now hits the error middleware — the express-async-errors package is obsolete.
  3. res.send(404) no longer sets status+body — use res.sendStatus(404).
  4. app.del removed (use app.delete); req.query is a getter — no direct mutation tricks.

Also

  • Node 18+ required.
  • The default query parser changed — apps relying on qs-style nested parsing must set app.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.