inversify-express-utils icon indicating copy to clipboard operation
inversify-express-utils copied to clipboard

Express 5 with Inversify Express Utils

Open jan-wuebbels opened this issue 8 months ago • 3 comments

Summary:

With the release of Express 5 there is a breaking change how wildcards are handled with https://github.com/pillarjs/path-to-regexp. Express has a migration guide for possible troubleshooting : https://expressjs.com/en/guide/migrating-5.html#path-syntax.

Issue:

inversify-express-utils uses a *-wildcard route inside the build-method of the server.ts which results in an error when starting the inversify server.

Error: Uncaught TypeError: Missing parameter name at 1: https://git.new/pathToRegexpError

Code: https://github.com/inversify/inversify-express-utils/blob/2e9e2b0df1bafd5109a5452a3831ded9de135584/src/server.ts#L126

Possible Solution:

Maybe add a name to the matching like the migration guide recommends?

jan-wuebbels avatar May 08 '25 09:05 jan-wuebbels

I am also having some errors when migrating from express 4.x.x to 5.x.x

vdhuyme avatar May 23 '25 03:05 vdhuyme

I have similar issue, any plan to add this feature to next version?

trankhoa798devpath avatar Aug 19 '25 15:08 trankhoa798devpath

Hey guys, ~~we are working on the future of the inversify http tools~~ we've built the future of the http tools in the monorepo. We deployed docs as well if you want to have them a look. This tools provide support for express 4, express 5, fastify and hono

notaphplover avatar Aug 19 '25 15:08 notaphplover