简体   繁体   English

如何列出可用的 npm 全局包

[英]How to list available npm global packages

I have a few global packages available in my computer.我的计算机中有一些可用的全局软件包。 I want to list them all using npm command without going to to the global installation folder found using npm root -g我想使用 npm 命令将它们全部列出,而无需转到使用npm root -g找到的全局安装文件夹

 npm list -g --depth=0

-g will look for the packages installed globally. -g将查找全局安装的软件包。 If you need to check locally installed packages remove -g如果您需要检查本地安装的软件包,请删除-g

--depth=0 will avoid every dependency in the tree --depth=0将避免树中的每个依赖项

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM