I'd like to find out which packages depend on express
among the installed sails/kraken/loopback/hapi/koa
etc. Are there npm
sub-commands or other ways to locally list all reverse dependencies on one specific npm package?
Use the npm list to show the installed packages in the current project as a dependency tree. Use npm list --depth=n to show the dependency tree with a specified depth. Use npm list --prod to show packages in the dependencies . Use npm list --dev to show packages in the devDependencies .
the package is installed in the current file tree, under the node_modules subfolder. As this happens, npm also adds the lodash entry in the dependencies property of the package. json file present in the current folder.
You can restore your package. json file to its previous state (hopefully you still have that, or at least remember what you had changed), and then do another npm update .
Adding package name after npm ls
will show you tree only with the specified package.
npm ls express
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With