npm explain

解释已安装的包

概要

npm explain <package-spec>

alias: why

描述

此命令将打印导致在当前项目中安装给定包的依赖链。

如果提供了一个或多个包规范,则只有与其中一个说明符匹配的包才会解释它们的关系。

包规范还可以引用 ./node_modules 中的文件夹

例如,在 npm 的源代码树中运行 npm explain glob 将显示:

glob@7.1.6
node_modules/glob
  glob@"^7.1.4" from the root project

glob@7.1.1 dev
node_modules/tacks/node_modules/glob
  glob@"^7.0.5" from rimraf@2.6.2
  node_modules/tacks/node_modules/rimraf
    rimraf@"^2.6.2" from tacks@1.3.0
    node_modules/tacks
      dev tacks@"^1.3.0" from the root project

xfoLhQYNNeuuRD8BnKrvYuJ5ki3lWJYjeEUPICLGUf1jEN7jwp2JwEzasoBCGBlupByAi/uH9OW9nz1+peGMeUzWWqVH3tcfazwL4iOCHlkwJSDNAZl1Ho4CO5dQz8B/rR4emszkFBvo1UNI1zQ/yPxISJ4q5UpsUuuXFbkCqFyWpCXAgnD6DrNy6C06S6gS5zvoETaRdYllTmtHRRCEgcd/dmhd7ylcSfOcQty+R4dv8X09Ub6lsc0YUjKHpGArz8WOfVtcjIalMXlD0pEd4w==

$ npm explain node_modules/nyc/node_modules/find-up
find-up@3.0.0 dev
node_modules/nyc/node_modules/find-up
  find-up@"^3.0.0" from nyc@14.1.1
  node_modules/nyc
    nyc@"^14.1.1" from tap@14.10.8
    node_modules/tap
      dev tap@"^14.10.8" from the root project

配置

json

    cpHcqTIrxEt4f28KOhZfPtN+1DnZvVBVAKYGUmWOIwWGrGLru+wlVoKtqRRY32EZnPsvqMSi6MrpxrMwdvnc+A==

tuWzaBh7Hg0RJSmQRjRdDCwXTeQobgtuYpCLLuAWUpV8N0aZPquIzn8VhL3gVbm5U6rhW7dxvCNiDD2tf/ZQWg==

    0p92ezPAdiik9IRo9I3R1nhwzGveq5GxraVl9fxxy4syFQ/6WqG8+6XxL5j4LCYquhzAOuxdSD1j/dB354BH7JUaGCgZLa7Cnea1xLIaV9Y6h7TLAYANuRCKrHY7b88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