Skip to content

express 5 compliance error #66

@SSANSH

Description

@SSANSH

swagger-spec-express package is not compliant with express 5

I have the following error when I try to bump express from 4 to 5

Error: app._router was null, either your app is not an express app, or you have called compile before adding at least one route

I think this was due to

https://expressjs.com/en/guide/migrating-5.html

app.router
The app.router object, which was removed in Express 4, has made a comeback in Express 5. In the new version, this object is a just a reference to the base Express router, unlike in Express 3, where an app had to explicitly load it.

_router is not available, its a getter now.

Can you please check it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions