Skip to content

Express 5 with Inversify Express Utils #473

@jan-wuebbels

Description

@jan-wuebbels

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:

this._app.all('*', (req: Request, res: Response, next: NextFunction) => {

Possible Solution:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions