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.

Wrong unused dep detected

See original GitHub issue

I have this TypeScript code:

import { FrameworkConfiguration } from "aurelia-framework";
import { Container } from "aurelia-dependency-injection";

export function configure(frameworkConfiguration: FrameworkConfiguration, pluginConfiguration: Function) {
    let container: Container = frameworkConfiguration.container;
    // other code
}

and packages aurelia-dependency-injection and aurelia-framework installed:

{
  "//": "other package.json entries",
  "dependencies": {
    "aurelia-dependency-injection": "^1.2.0",
    "aurelia-framework": "^1.0.7",
    "aurelia-http-client": "^1.0.3",
    "aurelia-http-utils": "^0.2.2",
    "type-binder": "^0.2.0"
  }
}

But…

$ depcheck
Unused dependencies
* aurelia-framework

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rumplcommented, Jan 31, 2019

Hey @heruan, thanks for reporting this.

Indeed, we are transpiling typescript code before giving the output to our main parser (babel) and in doing that we are losing all the types… I’ll see what I can do, I understand that this is not ideal for typescript users.

In the meantime you can add those to the list of ignored dependencies.

Cheers

0reactions
stale[bot]commented, Apr 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

depcheck - npm
depcheck. Depcheck is a tool for analyzing the dependencies in a project to see: how each dependency is used, which dependencies are useless ......
Read more >
Suppress Maven Dependency Plugin's "Unused declared ...
The answer is correct for suppressing the warnings. I just want to point out, however, that maven is pretty good and not producing...
Read more >
How to Remove Unused Dependencies in React - Pluralsight
It helps to identify which npm packages are being utilized in your app and which are not. In an empty React project, install...
Read more >
depcheck | Yarn - Package Manager
depcheck. Depcheck is a tool for analyzing the dependencies in a project to see: how each dependency is used, which dependencies are useless, ......
Read more >
Dependency Pre-Bundling - Vite
Vite automatically detects dependencies that are not resolved from node_modules and treats the linked dep as source code. It will not attempt to...
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