npm ls

列出已安装的包

概要

npm ls [[<@scope>/]<pkg> ...]

aliases: list, la, ll

描述

此命令将以树形结构将已安装的所有包版本及其依赖项打印到标准输出。

位置参数是 name@version-range 标识符,它将结果限制为仅指定包的路径。请注意,嵌套包还将显示指定包的路径。例如,在 npm 的源代码树中运行 npm ls promzard 将显示:

    npm@6.14.17 /path/to/npm
    └─┬ init-package-json@0.0.4
      └── promzard@0.1.5

它将打印出无关的、丢失的和无效的包。

如果一个项目为依赖项指定了 git url,这些会显示在 name@version 之后的括号中,以便用户更容易识别项目的潜在分支。

SxNq08wnM4rgZSOTjl3pElVNUMYDo5hB0PLYath0/Cf2Re3qog1lFhuIPVJmycUQscyxrHMWhC7SkgNnUhnSyakIKamAT8G7kpz15WKc9PsfR58fgQ80E87/oh73AFUiQ7vSAasYJ7jbnVcpD6i3+ANbECqXVbmftXyoBuUocHU=

vXXyZoCXNGJL2Bdq7B0GKUxA3BnPgBmwZSA7Xs7zWLpKpETHqBLBmbtYNMzCVtjcJI0AYn2O7ZjU6qaqubIuT8xIeLo2ow0/JFSkNeKClvs=

配置

json

    EpH0pOUcYTmP1NTiHWcSliUJTBm//oVXh/pDP8UGh5dbSujBiD6FY3AqOvsSLxA8vKUZeAW9UrwwVzFqUQF35A==

o2HKEDOoz7eiwXJlk3utElJB2TcpP7K59+l98bYcYJk=

long

    EpH0pOUcYTmP1NTiHWcSliUJTBm//oVXh/pDP8UGh5dbSujBiD6FY3AqOvsSLxA8vKUZeAW9UrwwVzFqUQF35A==

LLIGkfyaRF7qzOnNIFw2Dl4uS2t9qfyLHKoansasbCI=

parseable

    EpH0pOUcYTmP1NTiHWcSliUJTBm//oVXh/pDP8UGh5dbSujBiD6FY3AqOvsSLxA8vKUZeAW9UrwwVzFqUQF35A==

q+TO6Cxqi7HAX6axKh+V3x3Oowjc0Ep6ICEqMLVgRn/o5z0dEu76CKM3NTqpOAxn

global

    EpH0pOUcYTmP1NTiHWcSliUJTBm//oVXh/pDP8UGh5dbSujBiD6FY3AqOvsSLxA8vKUZeAW9UrwwVzFqUQF35A==

qsdxdoYPSmyGs9yfIhYo6MnydueUZmU7JI7GnqZ/gVblsQyig+Nl/lF05srIWmmumHJ8R8DEHerqroYMwliNQsAymjVUIf4r+bqDcTnnELs=

depth

    28vEnqfwhMZN6a3iLP8NioYKlEp9aVojbobyhwAbsNg=

sc1FK0pg+3P38U99pf2wdXTineLGTx81pnr5j5i+w5piGa5+Q/oPSFKoI5fmmPu0

prod / production

    x9FizpgpEUwCsc7VnkbU6R7AdAFlB5OypolU+zPrzqTGqZrQz0fGf0ZLHZjOhxxVrZn6ScUyQSAcBNdx+ERB9g==

v15wE8JIXjge61QcXcSwcTEdSRjWMgqUXMEsDlt4UDVMxnAAiP3Kw145YoHPTNYr+lUej6n7M1a0Yiqik0e/5w==

dev / development

    x9FizpgpEUwCsc7VnkbU6R7AdAFlB5OypolU+zPrzqTGqZrQz0fGf0ZLHZjOhxxVrZn6ScUyQSAcBNdx+ERB9g==

v15wE8JIXjge61QcXcSwcV2UM6eAAxkfz5HJ3aYA+3PgkiTlzxP60ULmTzbiCORVx0AFm0aC+q+EShTgcdhc4x9pqH9Q+/U6rQI+lopGVgQ=

only

    unmv8oHz/p8ABDeMLHhbdaViiQtBkpXLzUaGYwtN2WU=

WRzj4WOJXxX8rcdazQX9US5fIV81ZP54jHcgfwgzjaqXOKcnfvbF5xxlfclqwRNUAuOps0bm4aYIBuudWnHNc3MhqYlSNkON76FAQO0q6UI=

5MMH1j+t8V6ybPefY6/f3CsTLeFhpdLrOpevmQdpiRSi2exHSCoor2EEE6bB4M5XGzOsbtDzcKI6ZJI1DD0Ad7+tBqbmtCggY/L5Ud+Ns+E=

    x9FizpgpEUwCsc7VnkbU6R7AdAFlB5OypolU+zPrzqTGqZrQz0fGf0ZLHZjOhxxVrZn6ScUyQSAcBNdx+ERB9g==

XiIJpdvo5myyTe4HFAQ4skIJOrXQSrB7otRl6QARLwI=

unicode

    x9FizpgpEUwCsc7VnkbU6R7AdAFlB5OypolU+zPrzqQHHRhnjGBL+xWoy5+KCodKMGbGXo1X/nS44WcBJFiNrw==

qR2ZiMTgoVX3l1fGG5W95JuLwiakt1KPymsPCyODficvWh99CU+hFuNSKh1vC8ehDxZ9NqYiqQUcDtp5PsQ4SLhMXE2nHA4u1R/K0/a9SoPJMWEayepqTZyTnnkOJ91F