Closed armaansharma786 closed 1 year ago
Please provide a minimum reproduction repository. You can start from this minimal project.
in this its working fine
but why not in my own project, what should i check for that, because currently I am not able to build it, it gets stuck and after so much time error prints on the terminal that i have mentioned in the previous message
Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.
Is there an existing issue for this?
Current behavior
I want in my project without injecting service, want to use service method,
for that i am using moduleRef
in moduleRef i am using get function moduleRef.get(service, {strict: false});
but above line not returning anything and flow gets stucked there. i am using moduleRef.get fn inside onModuleInit but my application is not bootstrapping due to this, after 5- 10 mins it gives me error on terminal
Application bootstrap error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: RangeError: Invalid string length drpt-bo-backend | at String.replaceAll ()
drpt-bo-backend | at formatValue (node:internal/util/inspect:819:16)
drpt-bo-backend | at formatProperty (node:internal/util/inspect:1920:11)
drpt-bo-backend | at formatRaw (node:internal/util/inspect:1055:9)
drpt-bo-backend | at formatValue (node:internal/util/inspect:841:10)
drpt-bo-backend | at formatProperty (node:internal/util/inspect:1920:11)
drpt-bo-backend | at formatRaw (node:internal/util/inspect:1055:9)
drpt-bo-backend | at formatValue (node:internal/util/inspect:841:10)
drpt-bo-backend | at inspect (node:internal/util/inspect:365:10)
drpt-bo-backend | at PrismaService.i. (/usr/src/app/node_modules/@prisma/client/runtime/library.js:163:12958)
drpt-bo-backend | This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
drpt-bo-backend | Please open an issue with this stack trace at https://github.com/nodejs/node/issues
Minimum reproduction code
dont know its a public issue
Steps to reproduce
No response
Expected behavior
If i am using moduleRef.get fn to extract instance of service provide, it should give me the instance of that service
Package
Other package
No response
NestJS version
9.2.0
Packages versions
Node.js version
18.12.1
In which operating systems have you tested?
Other
No response