Closed klu2 closed 7 months ago
Thank you for taking the time to submit your report! From the looks of it, this could be better discussed on our Discord. If you haven't already, please join here and send a new post in the #β π nestjs-help forum. Make sure to include a link to this issue, so you don't need to write it all again. We have a large community of helpful members, who will assist you in getting this to work.
Is there an existing issue for this?
Current behavior
I do have a quite simple Nest.js application, running on the latest version (10.3.1, but also tried with 10.0.1).
I have a controller which uses
@Request
as method parameters like that:That worksperfectly fine, but as soon as I import a
TypeOrmModule
like that into myAppModule
then the
req
in the controller from above is always undefined. There is some magic in the background byTypeOrmModule
which disables this method argument resolution and tbh I have no idea why.Minimum reproduction code
https://github.com/klu2/nest-typeorm-bug
Steps to reproduce
Hello, localhost
, coming fromAppController
import
toTypeOrmModule
inAppModule
and a just the database settings to a postgres database which exists on your machine`req
inAppController
does not have a value anymoreExpected behavior
The
@Req() req: Request
also works when typeorm from support nest.js is activePackage version
10.0.1
NestJS version
10.0.0
Node.js version
21
In which operating systems have you tested?
Other
No response