Easy way to list node modules I have npm linked?

前端 未结 9 1201
情话喂你
情话喂你 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:21

    I found this question after I also wrote my own tool, here it is for completeness: npm-list-linked.

    It will recursively follow all linked packages down in the hierarchy as well, at my work we sometimes may have npm link 2-3 levels deep and this way you can see exactly which are local and which ones are not, avoids surprises.

    $ npm-list-linked
    Linked packages in /home/user/projects/some-project/
        @prefix/package 0.2.7
            other-package 0.1.2
    

提交回复
热议问题