0

package.json lists all direct dependencies of the app. While npm-shrinkwrap.json lists all dependencies in a quite flat format (seems it puts child's dependencies as root's dependencies whenever possible (?))

Looking at those dependencies, I would like to know which introduce which so that I could possibly remove some non-essential dependencies which drag along a lot of non-essential dependencies.

How to do that?

Pahlevi Fikri Auliya
  • 4,157
  • 8
  • 35
  • 71

1 Answers1

2

Try running npm ls in your project directory - it will print a list of all the modules in your project in a tree format, showing you exactly what dependencies/sub-dependencies they have. From there you could always pipe the output into a text file if you want to view it more easily.

Joe Clay
  • 33,401
  • 4
  • 85
  • 85