npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Determine which packages are linked


As a developer, i would like to know what packages are linked with confidence and ease.

Current Workaround

  1. Use a bash command
    Currently, through bash i could do this through cli: find node_modules -type d -name ".bin" -prune -o -type l -print. This will reliably list the packages. However, it is coupled to the implmentation of listing the .node folder.

  2. Use npm-list-linked
    Pros: It’s a package and installable
    Cons: Must globally install another package to get this to work

Proposed solution:

Accept an argument to list linked packages:

What are your thoughts about the following (Please vote):

  1. npm ls --linked
  2. npm ls --type=linked
  3. npm link --list

Prior art:

There currently is an implementation out there that list packages: