New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fastify with TypeORM with @Body() undefined #13146
Comments
I managed to reproduce the issue by having the so it's not a bug on Also, that isn't related with Fastify adapter. It behaves the same with Express. I've no ideia on what's happening so far. |
I have similar problem |
me too, I have similar problem |
Not sure but it sounds like it might be related to the reflect-metadata package #13107 (comment) (incompatibility between versions)? |
I'm wondering if we should change the peer dependency restriction of NestJS packages to not allow ^0.2.1 yet (just pin it to 0.1 instead) to avoid packages hoisting |
Thanks @micalevisk the solution worked for me, in my case was a new project, so i followed the docs. But for sure is always a good practice to lock files |
Is there an existing issue for this?
Current behavior
When using NestJS with Fastify and add TypeORM module, the @Body() decorator change to undefined and the body gets empty on Swagger
Minimum reproduction code
https://github.com/trentsgustavo/error-typeorm
Steps to reproduce
1
npm i
2
npm run start:debug
3
Do a request to /auth
4 Open swagger on http://localhost:3001, see empty body on /auth route
Expected behavior
When comment TypeORM Module, @Body() gets data, when uncomment @Body() is undefined
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
@nestjs/typeorm
NestJS version
10.0.0
Packages versions
Node.js version
18.19.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: