express
3 traces
- Express 5: req.body is undefined (not {}) when no body parser ran — destructuring req.body throwsAfter upgrading to Express 5, handlers that do const { name } = req.body throw a TypeError (cannot destructure undefined) for requests with no body, a non-JSON content type, or on routes where no parser is mounted.…
- Express 5: req.query is a read-only getter and the default query parser is 'simple' (no nested a[b]=1 objects)After upgrading to Express 5: middleware that assigns to req.query (e.g. Fix: Store validated/coerced values somewhere else instead of overwriting req.query: Restore nested query parsing if clients send bracket syntax:
- TypeError: Missing parameter name at 1: https://git.new/pathToRegexpError — Express 5 needs named wildcards (/*splat)The server crashes at startup (not on a request) after npm install express pulls v5, with a stack trace inside path-to-regexp/dist/index.js: Triggered by Express 4 route patterns such as app.get('', ...),…