npm ls
Syntax
npm ls [<package>] [--depth=n] [--all]
Parameters
| Parameters | Description | Examples | Level |
|---|---|---|---|
(Parameters) |
npm ls |
Common | |
<package> |
npm ls react |
Common | |
--depth=n |
n | npm ls --depth=2 |
Common |
--all |
() | npm ls --all |
Advanced |
--production |
npm ls --production |
Advanced |
Examples
npm ls --depth=0
npm ls lodash
lodash
npm ls --all | grep react
react
npm ls -g --depth=0
Common Errors
npm ERR! missing, npm install
npm ERR! extraneous, npm prune
Tips
- npm ls --depth=0 Common
- grep Quickly find
- npm explain <package>