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

Undefined token #11

Closed
Ivanrenes opened this issue Mar 25, 2024 · 14 comments
Closed

Undefined token #11

Ivanrenes opened this issue Mar 25, 2024 · 14 comments

Comments

@Ivanrenes
Copy link

Screenshot 2024-03-24 at 9 11 20 PM

No sure what's going on

@glebbash
Copy link
Owner

Can you provide minimal reproduction?

@mrbatista
Copy link

mrbatista commented Mar 26, 2024

@glebbash same problem from me.
This is related to decorator metadata.
NestJS check for metadata design:type
Fireorm check form metadata design:paramtype

If change to design:type application start

@Ivanrenes
Copy link
Author

Ivanrenes commented Mar 26, 2024

Interesting, will check, I supposed I the issue is related to reflector-metadata lib then I tried to downgrade but didn't work, will check that, thanks!

@mrbatista
Copy link

@Ivanrenes related to rbuckton/reflect-metadata#160?

@glebbash
Copy link
Owner

glebbash commented Mar 26, 2024

I've seen issues upgrading to latest reflect-metadata as well.

If change to design:type application start

@mrbatista can you provide more info on this so I could add it to the lib.

@Ivanrenes
Copy link
Author

Ivanrenes commented Mar 26, 2024

@Ivanrenes related to rbuckton/reflect-metadata#160?

Yes

@mrbatista
Copy link

I've seen issues upgrading to latest reflect-metadata as well.

If change to design:type application start

@mrbatista can you provide more info on this so I could add it to the lib.

I'm trying to understand the problem:
Package @nest/common has moved reflect-metadata to peerDependecies https://github.com/nestjs/nest/blob/ddc1265735bdec0f2e1dc4ac19d98304692b841a/packages/common/package.json#L28 and allow 0.1.0 and 0.2.0 dependency.
My dependencies tree is correct:
Screenshot 2024-03-26 alle 12 12 54
fireorm library has peerDependency to ^0.1.13 https://github.com/wovalle/fireorm/blob/7305cbbe7c32f12d9e932abf3ed5c79f06891373/package.json#L78 which forces you to stay on version 0.1.*

nest check at this line for metadata design:type.
FireormService has different metadata (line 36):
Screenshot 2024-03-26 alle 12 53 33

@mrbatista
Copy link

Interesting, will check, I supposed I the issue is related to reflector-metadata lib then I tried to downgrade but didn't work, will check that, thanks!

@Ivanrenes any news?

@DiegoAsadurian
Copy link

Hello, i have the same issue.
Could anyone find a way to solve it?

@glebbash
Copy link
Owner

glebbash commented Mar 27, 2024

I managed to fix it in a sample project. The issue is in @nestjs/common@10.3.

Doing this should fix the issue:

npm i @nestjs/common@~10.2.10

@glebbash
Copy link
Owner

glebbash commented Mar 27, 2024

Seems like this PR is the cause of the issue: nestjs/nest#13056

@Ivanrenes
Copy link
Author

@glebbash absolutely, that's the issue

@glebbash
Copy link
Owner

PR was reverted, now npm i @nestjs/common@latest will work too.

@glebbash
Copy link
Owner

Closing this now. Thanks everyone for reporting and helping to find the issue. 💪

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

No branches or pull requests

4 participants