Easy way to list node modules I have npm linked?

前端 未结 9 1100
情话喂你
情话喂你 2021-01-29 21:55

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.

In fact, a list

9条回答
  •  借酒劲吻你
    2021-01-29 22:30

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

    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.

提交回复
热议问题