How do I find all installed packages that depend on a given package in NPM?

Viewed 42025

I have a npm package that i want to update. I can update my package.json, but I don't want to break something. Is there a way to list all of the installed packages that depend on it?

3 Answers

You may also find npm explain <package-name> useful as it explains why that package is installed, what depends on it, etc.

e.g. to understand why we have node-sass installed...

$ npm explain node-sass
node-sass@4.14.1 dev
node_modules/node-sass
  node-sass@"^4.8.3" from gulp-sass@4.1.1
  node_modules/gulp-sass
    dev gulp-sass@"^4.1.1" from the root project
Related