Closed netofri closed 12 months ago
Hello there netofri 👋
Thank you for opening your very first issue in this project.
We will try to get back to you as soon as we can.👀
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
Are you using a bundler? Did you import 'reflect-metadata'?
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
Since upgrading to tsoa5, none of the middlewares added using the @Middlewares decorator are getting called. This can happen in a certain machine, while in another machine not.
Sorting
Possible Solution
Instead of
import { Middlewares } from "tsoa";
Use
import { Middlewares } from "@tsoa/runtime";
This has worked for me. I do not know the underlying issue. I think it has to do with the Reflect.getMetadata function, in the
middlewares.js
file, that in some machines returns undefined, which breaks all of the middlewares, and in others it returns a value, which works.