nestjs / typeorm

TypeORM module for Nest framework (node.js) 🍇
https://nestjs.com
MIT License
1.93k stars 206 forks source link

Typeorm prevents Req Res Body decorators from working in version 10.0.2 with typeorm package 0.3.20 #1944

Closed Arcuman closed 7 months ago

Arcuman commented 7 months ago

Is there an existing issue for this?

Current behavior

Decorators are not working with typeorm version 0.3.20 but works with 0.3.19, not sure if I should create bug here, but I think it related to this module more than to typeorm
I can't extract Req or Res or Body or any other custom decorators

Minimum reproduction code

https://github.com/Arcuman/nestjs-auth/tree/typeorm-bug

Steps to reproduce

npm i docker-compose up -d npm run start:dev curl --location 'http://localhost:3000/' \ --header 'Content-Type: application/json' \ --data '{ "coffee": "1" }'

Expected behavior

response has {"coffee":"1"}

Package version

10.0.2

NestJS version

10.0.0

Node.js version

18.17.0

In which operating systems have you tested?

Other

No response

micalevisk commented 7 months ago

related with this: https://github.com/typeorm/typeorm/issues/10671

OSA413 commented 7 months ago

I can confirm that OP's error is reproducible. The error goes away when you install npm i typeorm@0.3.21-dev.e7649d2 or newer.