【问题标题】:npm: find out which dependencies use a given package (indirectly)npm:找出哪些依赖项使用给定的包(间接)
【发布时间】:2016-09-16 08:47:25
【问题描述】:

我目前正在开发一个 node.js 项目,并且在开发过程中我一直在跟上最新的节点版本。现在节点 6 出来了,我想看看我是否也可以做出这个决定。

原来我使用的一些模块依赖于不支持节点 6 的旧版本 graceful-fs。我在安装和执行我的应用程序时收到警告,但我无法确定 graceful-fs 的位置正在使用包(间接)。

我怎样才能知道?

【问题讨论】:

    标签: node.js npm npm-install


    【解决方案1】:

    从@Soufiane Ghzal 的评论和 npm-ls 文档中复制:

    要“自下而上”地了解特定包为何包含在树中,请使用npm explain

    【讨论】:

      【解决方案2】:

      我很确定这就是你想要的:

      npm ls graceful-fs

      See documentation here.

      【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-11-28
      • 2013-09-18
      • 2020-01-24
      • 1970-01-01
      • 2019-09-17
      • 1970-01-01
      • 2018-09-16
      • 2014-11-28
      相关资源
      最近更新 更多