Easy way to list node modules I have npm linked?

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

    To list all globally linked modules, this works (documentation https://docs.npmjs.com/cli/ls):

    npm ls -g --depth=0 --link=true
    

    I had to update the version of npm on my machine first, though:

    npm install npm@latest -g
    

提交回复
热议问题