列出我已链接 npm 的节点模块的简单方法? [英] Easy way to list node modules I have npm linked?

查看:47
本文介绍了列出我已链接 npm 的节点模块的简单方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个命令,该命令将列出我npm 链接到本地副本的全局模块的名称,同时列出本地路径.

I am looking for a command that will list the names of global modules that I have npm link'd to local copies, also listing the local path.

事实上,一个所有全局安装模块的列表会更好,以npm链接'd标记以某种方式.

In fact, a list of all globally installed modules would be even better, with the npm link'd ones flagged somehow.

推荐答案

您是否尝试仅列出 node_modules 目录内容(例如 ls -l node_modules | grep ^l)?它们是普通的符号链接.

Did you try just listing the node_modules directory contents (e.g. ls -l node_modules | grep ^l)? They're normal symlinks.

如果你真的需要找到所有符号链接,你可以尝试类似find/-type d -name "node_modules" 2>/dev/null |xargs -I{} find {} -type l -maxdepth 1 |xargs ls -l.

If you really need to find all symlinks, you could try something like find / -type d -name "node_modules" 2>/dev/null | xargs -I{} find {} -type l -maxdepth 1 | xargs ls -l.

这篇关于列出我已链接 npm 的节点模块的简单方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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