Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
npm-ll.md230 linesDownload Raw Back to commands
1---
2title: npm-ll
3section: 1
4description: List installed packages
5---
6
7### Synopsis
8
9```bash
10npm ll [[<@scope>/]<pkg> ...]
11
12alias: la
13```
14
15### Description
16
17List installed packages
18
19### Configuration
20
21#### `all`
22
23* Default: false
24* Type: Boolean
25
26When running `npm outdated` and `npm ls`, setting `--all` will show all
27outdated or installed packages, rather than only those directly depended
28upon by the current project.
29
30
31
32#### `json`
33
34* Default: false
35* Type: Boolean
36
37Whether or not to output JSON data, rather than the normal output.
38
39* In `npm pkg set` it enables parsing set values with JSON.parse() before
40  saving them to your `package.json`.
41
42Not supported by all npm commands.
43
44
45
46#### `long`
47
48* Default: false
49* Type: Boolean
50
51Show extended information in `ls`, `search`, and `help-search`.
52
53
54
55#### `parseable`
56
57* Default: false
58* Type: Boolean
59
60Output parseable results from commands that write to standard output. For
61`npm search`, this will be tab-separated table format.
62
63
64
65#### `global`
66
67* Default: false
68* Type: Boolean
69
70Operates in "global" mode, so that packages are installed into the `prefix`
71folder instead of the current working directory. See
72[folders](/configuring-npm/folders) for more on the differences in behavior.
73
74* packages are installed into the `{prefix}/lib/node_modules` folder, instead
75  of the current working directory.
76* bin files are linked to `{prefix}/bin`
77* man pages are linked to `{prefix}/share/man`
78
79
80
81#### `depth`
82
83* Default: `Infinity` if `--all` is set; otherwise, `0`
84* Type: null or Number
85
86The depth to go when recursing packages for `npm ls`.
87
88If not set, `npm ls` will show only the immediate dependencies of the root
89project. If `--all` is set, then npm will show all dependencies by default.
90
91
92
93#### `omit`
94
95* Default: 'dev' if the `NODE_ENV` environment variable is set to
96  'production'; otherwise, empty.
97* Type: "dev", "optional", or "peer" (can be set multiple times)
98
99Dependency types to omit from the installation tree on disk.
100
101Note that these dependencies _are_ still resolved and added to the
102`package-lock.json` or `npm-shrinkwrap.json` file. They are just not
103physically installed on disk.
104
105If a package type appears in both the `--include` and `--omit` lists, then
106it will be included.
107
108If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
109variable will be set to `'production'` for all lifecycle scripts.
110
111
112
113#### `include`
114
115* Default:
116* Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
117
118Option that allows for defining which types of dependencies to install.
119
120This is the inverse of `--omit=<type>`.
121
122Dependency types specified in `--include` will not be omitted, regardless of
123the order in which omit/include are specified on the command-line.
124
125
126
127#### `link`
128
129* Default: false
130* Type: Boolean
131
132Used with `npm ls`, limiting output to only those packages that are linked.
133
134
135
136#### `package-lock-only`
137
138* Default: false
139* Type: Boolean
140
141If set to true, the current operation will only use the `package-lock.json`,
142ignoring `node_modules`.
143
144For `update` this means only the `package-lock.json` will be updated,
145instead of checking `node_modules` and downloading dependencies.
146
147For `list` this means the output will be based on the tree described by the
148`package-lock.json`, rather than the contents of `node_modules`.
149
150
151
152#### `unicode`
153
154* Default: false on windows, true on mac/unix systems with a unicode locale,
155  as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.
156* Type: Boolean
157
158When set to true, npm uses unicode characters in the tree output. When
159false, it uses ascii characters instead of unicode glyphs.
160
161
162
163#### `workspace`
164
165* Default:
166* Type: String (can be set multiple times)
167
168Enable running a command in the context of the configured workspaces of the
169current project while filtering by running only the workspaces defined by
170this configuration option.
171
172Valid values for the `workspace` config are either:
173
174* Workspace names
175* Path to a workspace directory
176* Path to a parent workspace directory (will result in selecting all
177  workspaces within that folder)
178
179When set for the `npm init` command, this may be set to the folder of a
180workspace which does not yet exist, to create the folder and set it up as a
181brand new workspace within the project.
182
183This value is not exported to the environment for child processes.
184
185#### `workspaces`
186
187* Default: null
188* Type: null or Boolean
189
190Set to true to run the command in the context of **all** configured
191workspaces.
192
193Explicitly setting this to false will cause commands like `install` to
194ignore workspaces altogether. When not set explicitly:
195
196- Commands that operate on the `node_modules` tree (install, update, etc.)
197will link workspaces into the `node_modules` folder. - Commands that do
198other things (test, exec, publish, etc.) will operate on the root project,
199_unless_ one or more workspaces are specified in the `workspace` config.
200
201This value is not exported to the environment for child processes.
202
203#### `include-workspace-root`
204
205* Default: false
206* Type: Boolean
207
208Include the workspace root when workspaces are enabled for a command.
209
210When false, specifying individual workspaces via the `workspace` config, or
211all workspaces via the `workspaces` flag, will cause npm to operate only on
212the specified workspaces, and not on the root project.
213
214This value is not exported to the environment for child processes.
215
216#### `install-links`
217
218* Default: false
219* Type: Boolean
220
221When set file: protocol dependencies will be packed and installed as regular
222dependencies instead of creating a symlink. This option has no effect on
223workspaces.
224
225
226
227### See Also
228
229* [npm help config](/commands/npm-config)
230 
codekingpro/portable-devtools · Team Ai