Last Updated: February 25, 2016
·
6.212K
· Ionut-Cristian Florescu

The "new" npm list --depth=0

A while ago I wrote this post about a quick way to list just the top-level NPM modules, but it's worth saying that due to a recent bug in NPM, --depth=0 doesn't work anymore.

NPM list

Here's a hack you can use in your .bash_profile for the same purpose until they fix the npm command:

npml() {
  npm list $@ | grep ^[├└]
}

alias npml=npml