如何列出npm用户安装的软件包? [英] How to list npm user-installed packages?

查看:162
本文介绍了如何列出npm用户安装的软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何仅在npm中列出用户安装的软件包?当我执行npm -g list时,它将输出每个程序包及其依赖项,这不是我想要的.

How do I list the user-installed package ONLY in npm? When I do npm -g list it outputs every package and their dependencies, which is not what I want.

推荐答案

这也很好:npm list -g --depth=0

  • npm :Node软件包管理器命令行工具
  • 列表-g :显示在用户文件夹中找到的每个软件包的树(不带-g选项,仅显示当前目录的软件包)
  • depth 0/-depth = 0 :避免在树状视图中包含每个程序包的依赖项
  • npm: the Node package manager command line tool
  • list -g: display a tree of every package found in the user’s folders (without the -g option it only shows the current directory’s packages)
  • depth 0 / — depth=0: avoid including every package’s dependencies in the tree view

这篇关于如何列出npm用户安装的软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆