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.

[Documentation] TypeScript dependency management

See original GitHub issue

In the documentation you mentioned:

It is incredibly easy to manage dependencies with TypeScript. If you are not TypeScript enthusiast and you work with plain JavaScript, you have to do it in this way:

This is slightly confusing since there’s not mention of how to “manage dependencies with TypeScript” and the examples in the documentation will not run unless I add the @Dependencies([UsersService]) decorator. Without this decorator I’d get this exception:

[Nest] 2031   - 4/11/2017, 1:08:53 PM   [ExceptionsHandler] Cannot read property 'getUser' of undefined
TypeError: Cannot read property 'getUser' of undefined

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
kamilmysliwieccommented, Apr 13, 2017

Hi @alexcorvi @ThomRick,

Let’s add:

"emitDecoratorMetadata": true,

to your tsconfig.json file. It is my mistake - I didn’t mention about it in the documentation.

EDIT: I answered using my old account.

0reactions
lock[bot]commented, Sep 25, 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

Documentation - Integrating with Build Tools
TypeScript.MSBuild; Hit Install; When install is complete, rebuild! More details can be found at Package Manager Dialog and using nightly builds with NuGet ......
Read more >
Managing dependency boundaries in TypeScript
Discuss the importance of dependencies in TypeScript, reviewing the potential pitfalls when dependencies are left unchecked.
Read more >
Make Your Life Easy With Dependency Injection in ...
Make Your Life Easy With Dependency Injection in Your TypeScript Projects ... you can check also the library documentation for more details.
Read more >
NPM Support
Learn about Babylon.js's use of the NPM Package Manager. ... To include Babylon in a javascript or typescript file, use:.
Read more >
TypeScript | CLion Documentation
If your project package manager is Yarn 2, you have to use the typescript package installed via Yarn 2. In this case, yarn:package.json:typescript...
Read more >

github_iconTop Related Medium Post

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