I know that somewhere in my dependency tree I depend on a library, but I would like to find easily which libraries depends on it (a bit like
npm ls command will take a package as a parameter and display any packages that depend upon it along with its path.
npm ls <pkg>
This command will print to stdout all the versions of packages that are installed, as well as their dependencies, in a tree-structure.
Positional arguments are name@version-range identifiers, which will limit the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm's source tree will show:
npm@@VERSION@ /path/to/npm └─┬ firstname.lastname@example.org └── email@example.com