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.

Nx dep-graph does not exclude projects from the generated graph

See original GitHub issue

Expected Behavior

Running nx dep-graph --exclude=my-project would remove my-project and it’s dependencies from the generated graph

Current Behavior

Running nx dep-graph --exclude=my-project generates the graph but keeps my-project and it’s dependencies in the generated graph

Context

Versions:

@nrwl/angular - 8.5.0

Edit:

I tried using this functionality as per the dep-graph API at https://nx.dev/web/api/workspace/npmscripts/dep-graph#exclude

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

3reactions
krzysztof-raciniewskicommented, Sep 27, 2019

I agree with JVHeerden. This functionality can help in larger projects where the graph is currently very unclear:

image

I think this feature can be useful during library optimization

3reactions
undefined-dot-jsoncommented, Sep 21, 2019

Do you believe this would be useful? What was your motivation behind using excludes with dep-graph?

I do believe it would. We currently use an Nx-powered mono-repo with over 50 feature modules and even more shared modules. A lot of the projects are being shared between all of the feature modules in the repo (a cdk, for instance).

The generated dependency graph gets very convoluted if all the feature projects have dependencies linked to the shared projects.

Excluding the projects that we know are shared would enable us to properly visualise the other dependencies.

Just an idea of the amount of dependencies a single one of our shared projects have in the workspace: image

Read more comments on GitHub >

github_iconTop Results From Across the Web

graph - CLI command - Nx
Show the graph where every node is either an ancestor or a descendant of todos-feature-main, but exclude project-one and project-two:.
Read more >
How to run nx dep-graph on specific projects only
When using Nx, I would like to run a dep-graph analysis on only a single project to show its dependant libraries without showing...
Read more >
nx affected:dep-graph - Fig.io
--exclude <arg>, Exclude certain projects from being processed. --files <arg>, Change the way Nx is calculating the affected command by providing directly ...
Read more >
nrwl-nx/community - Gitter
Could not find target "serve" in the nest project. ... "affected:dep-graph": "nx affected:dep-graph", ... to show where the warning was created
Read more >
Nx Dependency Graph - YouTube
Nx Dependency Graph. Watch later. Share. Copy link. Info. Shopping. Tap to unmute. If playback doesn't begin shortly, try restarting your ...
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