How do I list the user-installed package ONLY in npm? When I do npm -g list it outputs every package and their dependencies, which is not what I wa
npm ls
npm list is just an alias for npm ls
For the extended info use
npm la
npm ll
You can always set --depth=0 at the end to get the first level deep.
npm ls --depth=0
You can check development and production packages.
npm ls --only=dev
npm ls --only=prod
To show the info in json format
npm ls --json=true
The default is false
npm ls --json=false
You can insist on long format to show extended information.
npm ls --long=true
You can show parseable output instead of tree view.
npm ls --parseable=true
You can list packages in the global install prefix instead of in the current project.
npm ls --global=true
npm ls -g // shorthand
Full documentation you can find here.