DeX3
DeX3

Reputation: 5539

npm: find out which dependencies use a given package (indirectly)

I'm currently working on a node.js-project and I've been keeping up with the most recent node releases during development. Now that node 6 is out, I wanted to see if I could make that decision as well.

It turns out some of the modules I use are dependent on older versions of graceful-fs which doesn't support node 6. I get warnings when installing and executing my application, but I can't determine where the graceful-fs package is being used (indirectly).

How can I find out?

Upvotes: 48

Views: 31401

Answers (2)

Noumenon
Noumenon

Reputation: 6412

Copying from @Soufiane Ghzal's comment and the npm-ls docs:

To get a "bottoms up" view of why a given package is included in the tree at all, use npm explain.

Upvotes: 12

Don Scott
Don Scott

Reputation: 3457

I am fairly certain this is what you want:

npm ls graceful-fs

See documentation here.

Upvotes: 85

Related Questions