如何查看给定 npm 模块的依赖树? [英] How to view the dependency tree of a given npm module?
本文介绍了如何查看给定 npm 模块的依赖树?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何获取可用于 npm 但未在本地安装的模块树?
How can I get the tree of a module available to npm, but not installed locally ?
npm ll
为本地安装的包做这项工作.但它不适用于未安装的模块或全局安装的模块.
npm ll
does the job for locally installed packages. But it doesn't work for modules not installed or modules installed globally.
我试过 npm list bower
但不是这样.
I tried npm list bower
but that's not it.
推荐答案
您可以使用 npm-remote-ls
模块.您可以全局安装:
You can use the npm-remote-ls
module. You can install it globally:
npm install -g npm-remote-ls
然后调用:
npm-remote-ls bower
<小时>
或者,安装 npm@5.2.0
然后你可以使用 npx
并避免全局安装命令 - 只需调用:
Alternatively, npm@5.2.0
installed then you can use npx
and avoid globally installing the command - just call:
npx npm-remote-ls bower
这篇关于如何查看给定 npm 模块的依赖树?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文