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