Hello,
I'm just starting to work with nest.js framework and I noticed a couple of times, that I get a similar message:
Nest can't resolve dependencies of the SomeService. Please verify whether all of them are available in the current context
Wouldn't it be possible to tell precisely which dependency is not being picked up? Something like:
Nest was unable to resolve someDependency of SomeService in some.service.ts:15:25.
Some more informative error description would really help here
Hi @bytasv,
In progress 馃枌
While you're at it, maybe PR that feature against Angular! That would be a really good fx to have to help resolve deps.
Hi @bytasv,
It's done. More informative error messages are available with the latest update (4.3.0) 馃檪
[ExceptionHandler] Nest can't resolve dependencies of the UsersService (+, +, ?, +, +, +). Please verify whether [2] argument is available in the current context.
The error message doesn't make much sense. + and ? don't really say much. Is there documentation that can explain?
@JamesCoonce +'s mean the dependency was found, ? means it is missing. it tells you which dependency is missing in the order of injection
Why not use class name instand of +. And keep ? For unknown class.
That makes a lot more sense. + and ? are extremely vague.
Submitted a PR #814 for this @XGHeaven @JamesCoonce.
The new error message looks like this:
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hi @bytasv,
In progress 馃枌