You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a dynamic module with useFactory to provide a simple value, I observe unexpected behavior when injecting tokens in multiple modules. Specifically, when creating two modules with different values for the token, both instances end up with the same value, instead of retaining their respective values.
Is there an existing issue for this?
Current behavior
When using a dynamic module with useFactory to provide a simple value, I observe unexpected behavior when injecting tokens in multiple modules. Specifically, when creating two modules with different values for the token, both instances end up with the same value, instead of retaining their respective values.
Reproduction
Minimum reproduction code
https://github.com/Fksg/dynamic-module/blob/main/src/main.ts
Steps to reproduce
No response
Expected behavior
Each module should display its respective token as defined by its register call.
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
No response
NestJS version
10.4.6
Packages versions
"@nestjs/common": "10.4.6"
"@nestjs/core": "10.4.6"
Node.js version
20.17.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: