How to find reverse dependencies on npm package?

后端 未结 2 1660
温柔的废话
温柔的废话 2020-12-13 03:30

I\'d like to find out which packages depend on express among the installed sails/kraken/loopback/hapi/koa etc. Are there npm sub-comma

相关标签:
2条回答
  • 2020-12-13 03:41

    Adding package name after npm ls will show you tree only with the specified package.

    npm ls express
    
    0 讨论(0)
  • 2020-12-13 03:53

    I specifically wanted to find what package used a dependency that was breaking an initial install. This may help somebody out trying todo the same:

    find ./node_modules/ -name package.json | xargs grep <the_package_name>

    0 讨论(0)
提交回复
热议问题