Skip to content
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

typeorm: 0.3.20 introduces issues with @ApiProperty on some DTOs #2811

Closed
2 tasks done
OSA413 opened this issue Feb 1, 2024 · 5 comments
Closed
2 tasks done

typeorm: 0.3.20 introduces issues with @ApiProperty on some DTOs #2811

OSA413 opened this issue Feb 1, 2024 · 5 comments

Comments

@OSA413
Copy link

OSA413 commented Feb 1, 2024

Did you read the migration guide?

  • I have read the whole migration guide

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Potential Commit/PR that introduced the regression

No response

Versions

No response

Describe the regression

So, I recently updated packages and Swagger started to throw errors related to @ApiProperty (Optional) and circular dependency though a week ago it was just fine.

After investigation I figured out that downgrading typeorm from 0.3.20 to 0.3.19 fixes the issue.

Minimum reproduction code

https://github.com/OSA413/nestjs-bug-swagger-api-property

Expected behavior

For the error to not be thrown.

Other

Some more details of the issue can be found in NestJS' Discord and in this issue:

typeorm/typeorm#10671

@micalevisk
Copy link
Member

we can close this as this is not related to @nestjs/swagger but typeorm 0.3.20

@OSA413
Copy link
Author

OSA413 commented Feb 1, 2024

we can close this as this is not related to @nestjs/swagger but typeorm 0.3.20

As you mentioned in the comment, this may be related to updating reflect-metadata.

Like, does @nestjs/swagger work with reflect-metadata: 0.2.1? Will it support the newer version?

@OSA413
Copy link
Author

OSA413 commented Feb 1, 2024

Looks like this issue is related to other issues with the update of reflect-metadata like:

@OSA413
Copy link
Author

OSA413 commented Feb 4, 2024

I guess that this issue can be closed as duplicate of nestjs/nest#13107

Dev response: nestjs/nest#13107 (comment)

Explanation and temporal fix: nestjs/nest#13107 (comment)

@OSA413 OSA413 closed this as completed Feb 4, 2024
@OSA413
Copy link
Author

OSA413 commented Feb 8, 2024

Fixed with

"@nestjs/common": "^10.3.2",
"@nestjs/core": "^10.3.2",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants