question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dependency injection errors not informative

See original GitHub issue

I’m submitting a…


[x] Regression 
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

DI errors don’t have the service name and/or the failed dependency anymore:

 1: node::Abort() [/Users/me/.nvm/versions/node/v8.11.3/bin/node]
 2: node::Chdir(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/me/.nvm/versions/node/v8.11.3/bin/node]
 3: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [/Users/me/.nvm/versions/node/v8.11.3/bin/node]
 4: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/Users/me/.nvm/versions/node/v8.11.3/bin/node]
 5: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/me/.nvm/versions/node/v8.11.3/bin/node]
 6: 0x285c1f0842fd

Expected behavior

Injection errors should have informative error messages about the failed property target, etc as before 5.3.0.

Minimal reproduction of the problem with instructions

package.json:

    "@nestjs/common": "^5.3.2",
    "@nestjs/core": "^5.3.2",
    "@nestjs/graphql": "^5.1.1",
    "@nestjs/jwt": "^0.1.3",
    "@nestjs/passport": "^5.0.1",
    "@nestjs/typeorm": "^5.2.0",
    "@nestjs/websockets": "^5.3.1",

What is the motivation / use case for changing the behavior?

Environment


Nest version: 5.3.2

 
For Tooling issues:
- Node version: 8.11.3  
- Platform: macos 10.13.3 

Others:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
whtiehackcommented, Sep 4, 2018

Is there code that can be reproduced? Or full logs?

0reactions
lock[bot]commented, Sep 24, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Dependency Injection Does not work in Models or Tests ...
I am trying to write some unit tests for my Play Framework 2.4.6 application. I need WS for my purposes testing. However, when...
Read more >
Troubleshooting contexts and dependency injection - IBM
Use this task to troubleshoot errors related to Contexts and Dependency Injection (CDI) for the Java Platform, Enterprise Edition (Java EE) ...
Read more >
ASP.NET Core Dependency Injection Deep Dive
I am trying to troubleshoot a "cannot resolve scoped service from root provider" error in my application. There is very little on this...
Read more >
Functional approaches to dependency injection
For people who are learning functional programming techniques, one of the more common questions is: “how do you do dependency injection?
Read more >
Java Annotation: Dependency Injection and Beyond
However this information with an annotation does not change the semantics of a program. There are many uses of Java annotations during both...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found