Closed phuffer closed 8 months ago
https://github.com/nestjs/nest/issues/13146
TLDR; make sure you use the latest version (so reflect-metadata
version is in sync)
OP's error is reproducible with "typeorm": "^0.3.20"
And the error is fixed with "typeorm": "^0.3.21-dev.e7649d2"
or newer (I run npm i typeorm@0.3.21-dev.e7649d2
after checking that original code is still erroring).
Is there an existing issue for this?
Current behavior
When I import TypeOrmModule into a module, @Param decorators in controllers for other modules that do not import the TypeOrmModule stop extracting the param correctly.
Minimum reproduction code
https://github.com/phuffer/controller-broken-example
Steps to reproduce
See example repository README
Expected behavior
Param decorator works.
Package
Other package
@nestjs/typeorm
NestJS version
10.0.0
Packages versions
Node.js version
18.17.0
In which operating systems have you tested?
Other
In my primary project, my controller inside the module that imports the TypeOrmModule still receives parameters correctly, however I was not able to reproduce this in the example project. I also correctly add the connection config in my primary project, but observed the issue still shows when this connection config is not provided - so I omitted the connection config from the example to prevent having to setup a local SQL databse.