Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
npm-find-dupes.md246 linesDownload Raw Back to commands
1---
2title: npm-find-dupes
3section: 1
4description: Find duplication in the package tree
5---
6
7### Synopsis
8
9```bash
10npm find-dupes
11```
12
13### Description
14
15Runs `npm dedupe` in `--dry-run` mode, making npm only output the duplications, without actually changing the package tree.
16
17### Configuration
18
19#### `install-strategy`
20
21* Default: "hoisted"
22* Type: "hoisted", "nested", "shallow", or "linked"
23
24Sets the strategy for installing packages in node_modules. hoisted
25(default): Install non-duplicated in top-level, and duplicated as necessary
26within directory structure. nested: (formerly --legacy-bundling) install in
27place, no hoisting. shallow (formerly --global-style) only install direct
28deps at top-level. linked: (experimental) install in node_modules/.store,
29link in place, unhoisted.
30
31
32
33#### `legacy-bundling`
34
35* Default: false
36* Type: Boolean
37* DEPRECATED: This option has been deprecated in favor of
38  `--install-strategy=nested`
39
40Instead of hoisting package installs in `node_modules`, install packages in
41the same manner that they are depended on. This may cause very deep
42directory structures and duplicate package installs as there is no
43de-duplicating. Sets `--install-strategy=nested`.
44
45
46
47#### `global-style`
48
49* Default: false
50* Type: Boolean
51* DEPRECATED: This option has been deprecated in favor of
52  `--install-strategy=shallow`
53
54Only install direct dependencies in the top level `node_modules`, but hoist
55on deeper dependencies. Sets `--install-strategy=shallow`.
56
57
58
59#### `strict-peer-deps`
60
61* Default: false
62* Type: Boolean
63
64If set to `true`, and `--legacy-peer-deps` is not set, then _any_
65conflicting `peerDependencies` will be treated as an install failure, even
66if npm could reasonably guess the appropriate resolution based on non-peer
67dependency relationships.
68
69By default, conflicting `peerDependencies` deep in the dependency graph will
70be resolved using the nearest non-peer dependency specification, even if
71doing so will result in some packages receiving a peer dependency outside
72the range set in their package's `peerDependencies` object.
73
74When such an override is performed, a warning is printed, explaining the
75conflict and the packages involved. If `--strict-peer-deps` is set, then
76this warning is treated as a failure.
77
78
79
80#### `package-lock`
81
82* Default: true
83* Type: Boolean
84
85If set to false, then ignore `package-lock.json` files when installing. This
86will also prevent _writing_ `package-lock.json` if `save` is true.
87
88
89
90#### `omit`
91
92* Default: 'dev' if the `NODE_ENV` environment variable is set to
93  'production'; otherwise, empty.
94* Type: "dev", "optional", or "peer" (can be set multiple times)
95
96Dependency types to omit from the installation tree on disk.
97
98Note that these dependencies _are_ still resolved and added to the
99`package-lock.json` or `npm-shrinkwrap.json` file. They are just not
100physically installed on disk.
101
102If a package type appears in both the `--include` and `--omit` lists, then
103it will be included.
104
105If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
106variable will be set to `'production'` for all lifecycle scripts.
107
108
109
110#### `include`
111
112* Default:
113* Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
114
115Option that allows for defining which types of dependencies to install.
116
117This is the inverse of `--omit=<type>`.
118
119Dependency types specified in `--include` will not be omitted, regardless of
120the order in which omit/include are specified on the command-line.
121
122
123
124#### `ignore-scripts`
125
126* Default: false
127* Type: Boolean
128
129If true, npm does not run scripts specified in package.json files.
130
131Note that commands explicitly intended to run a particular script, such as
132`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still
133run their intended script if `ignore-scripts` is set, but they will *not*
134run any pre- or post-scripts.
135
136
137
138#### `audit`
139
140* Default: true
141* Type: Boolean
142
143When "true" submit audit reports alongside the current npm command to the
144default registry and all registries configured for scopes. See the
145documentation for [`npm audit`](/commands/npm-audit) for details on what is
146submitted.
147
148
149
150#### `bin-links`
151
152* Default: true
153* Type: Boolean
154
155Tells npm to create symlinks (or `.cmd` shims on Windows) for package
156executables.
157
158Set to false to have it not do this. This can be used to work around the
159fact that some file systems don't support symlinks, even on ostensibly Unix
160systems.
161
162
163
164#### `fund`
165
166* Default: true
167* Type: Boolean
168
169When "true" displays the message at the end of each `npm install`
170acknowledging the number of dependencies looking for funding. See [`npm
171fund`](/commands/npm-fund) for details.
172
173
174
175#### `workspace`
176
177* Default:
178* Type: String (can be set multiple times)
179
180Enable running a command in the context of the configured workspaces of the
181current project while filtering by running only the workspaces defined by
182this configuration option.
183
184Valid values for the `workspace` config are either:
185
186* Workspace names
187* Path to a workspace directory
188* Path to a parent workspace directory (will result in selecting all
189  workspaces within that folder)
190
191When set for the `npm init` command, this may be set to the folder of a
192workspace which does not yet exist, to create the folder and set it up as a
193brand new workspace within the project.
194
195This value is not exported to the environment for child processes.
196
197#### `workspaces`
198
199* Default: null
200* Type: null or Boolean
201
202Set to true to run the command in the context of **all** configured
203workspaces.
204
205Explicitly setting this to false will cause commands like `install` to
206ignore workspaces altogether. When not set explicitly:
207
208- Commands that operate on the `node_modules` tree (install, update, etc.)
209will link workspaces into the `node_modules` folder. - Commands that do
210other things (test, exec, publish, etc.) will operate on the root project,
211_unless_ one or more workspaces are specified in the `workspace` config.
212
213This value is not exported to the environment for child processes.
214
215#### `include-workspace-root`
216
217* Default: false
218* Type: Boolean
219
220Include the workspace root when workspaces are enabled for a command.
221
222When false, specifying individual workspaces via the `workspace` config, or
223all workspaces via the `workspaces` flag, will cause npm to operate only on
224the specified workspaces, and not on the root project.
225
226This value is not exported to the environment for child processes.
227
228#### `install-links`
229
230* Default: false
231* Type: Boolean
232
233When set file: protocol dependencies will be packed and installed as regular
234dependencies instead of creating a symlink. This option has no effect on
235workspaces.
236
237
238
239### See Also
240
241* [npm dedupe](/commands/npm-dedupe)
242* [npm ls](/commands/npm-ls)
243* [npm update](/commands/npm-update)
244* [npm install](/commands/npm-install)
245
246 
codekingpro/portable-devtools · Team Ai