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

Property based injection for PromService doesn't work #73

Open
snigdha920 opened this issue Nov 7, 2022 · 0 comments
Open

Property based injection for PromService doesn't work #73

snigdha920 opened this issue Nov 7, 2022 · 0 comments

Comments

@snigdha920
Copy link

Property based injections for PromService doesn't work, here is a minimal reproduction repo: https://github.com/snigdha920/nestjs-promservice-reproduction-repo

While starting the app, you will see that the property defined using the property injection is undefined but using the constructor injection is okay:

[Nest] 36696  - 11/07/2022, 12:05:45 PM     LOG [NestFactory] Starting Nest application...
[Nest] 36696  - 11/07/2022, 12:05:45 PM     LOG [InstanceLoader] PromCoreModule dependencies initialized +19ms
promServiceProperyInjection inside AppService constructor -  undefined
promServiceConstructorInjection inside AppService constructor -  PromService {}
[Nest] 36696  - 11/07/2022, 12:05:45 PM     LOG [InstanceLoader] PromModule dependencies initialized +1ms
[Nest] 36696  - 11/07/2022, 12:05:45 PM     LOG [InstanceLoader] AppModule dependencies initialized +0ms
[Nest] 36696  - 11/07/2022, 12:05:45 PM     LOG [RoutesResolver] AppController {/}: +2ms
[Nest] 36696  - 11/07/2022, 12:05:45 PM     LOG [RouterExplorer] Mapped {/, GET} route +1ms
[Nest] 36696  - 11/07/2022, 12:05:45 PM     LOG [RoutesResolver] PromController {/metrics}: +0ms
[Nest] 36696  - 11/07/2022, 12:05:45 PM     LOG [RouterExplorer] Mapped {/metrics, GET} route +0ms
[Nest] 36696  - 11/07/2022, 12:05:45 PM     LOG [NestApplication] Nest application successfully started +1ms
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

1 participant