1NPM-INSTALL-TEST(1) NPM-INSTALL-TEST(1)
2
3
4
6 npm-install-test - Install package(s) and run tests
7
8 Synopsis
9 npm install-test (with no args, in package dir)
10 npm install-test [<@scope>/]<name>
11 npm install-test [<@scope>/]<name>@<tag>
12 npm install-test [<@scope>/]<name>@<version>
13 npm install-test [<@scope>/]<name>@<version range>
14 npm install-test <tarball file>
15 npm install-test <tarball url>
16 npm install-test <folder>
17
18 alias: npm it
19 common options: [--save|--save-dev|--save-optional] [--save-exact] [--dry-run]
20
21 Description
22 This command runs an npm install followed immediately by an npm test.
23 It takes exactly the same arguments as npm install.
24
25 Configuration
26 <!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> <!-- automatically
27 generated, do not edit manually --> <!-- see lib/utils/config/defini‐
28 tions.js -->
29
30 save
31 • Default: true
32
33 • Type: Boolean
34
35
36 Save installed packages to a package.json file as dependencies.
37
38 When used with the npm rm command, removes the dependency from pack‐
39 age.json. <!-- automatically generated, do not edit manually --> <!--
40 see lib/utils/config/definitions.js -->
41
42
43 save-exact
44 • Default: false
45
46 • Type: Boolean
47
48
49 Dependencies saved to package.json will be configured with an exact
50 version rather than using npm's default semver range operator. <!--
51 automatically generated, do not edit manually --> <!-- see
52 lib/utils/config/definitions.js -->
53
54
55 global
56 • Default: false
57
58 • Type: Boolean
59
60
61 Operates in "global" mode, so that packages are installed into the pre‐
62 fix folder instead of the current working directory. See npm help fold‐
63 ers for more on the differences in behavior.
64
65 • packages are installed into the {prefix}/lib/node_modules folder, in‐
66 stead of the current working directory.
67
68 • bin files are linked to {prefix}/bin
69
70 • man pages are linked to {prefix}/share/man
71
72 <!-- automatically generated, do not edit manually --> <!-- see
73 lib/utils/config/definitions.js -->
74
75
76 global-style
77 • Default: false
78
79 • Type: Boolean
80
81
82 Causes npm to install the package into your local node_modules folder
83 with the same layout it uses with the global node_modules folder. Only
84 your direct dependencies will show in node_modules and everything they
85 depend on will be flattened in their node_modules folders. This obvi‐
86 ously will eliminate some deduping. If used with legacy-bundling,
87 legacy-bundling will be preferred. <!-- automatically generated, do
88 not edit manually --> <!-- see lib/utils/config/definitions.js -->
89
90
91 legacy-bundling
92 • Default: false
93
94 • Type: Boolean
95
96
97 Causes npm to install the package such that versions of npm prior to
98 1.4, such as the one included with node 0.8, can install the package.
99 This eliminates all automatic deduping. If used with global-style this
100 option will be preferred. <!-- automatically generated, do not edit
101 manually --> <!-- see lib/utils/config/definitions.js -->
102
103
104 strict-peer-deps
105 • Default: false
106
107 • Type: Boolean
108
109
110 If set to true, and --legacy-peer-deps is not set, then any conflicting
111 peerDependencies will be treated as an install failure, even if npm
112 could reasonably guess the appropriate resolution based on non-peer de‐
113 pendency relationships.
114
115 By default, conflicting peerDependencies deep in the dependency graph
116 will be resolved using the nearest non-peer dependency specification,
117 even if doing so will result in some packages receiving a peer depen‐
118 dency outside the range set in their package's peerDependencies object.
119
120 When such and override is performed, a warning is printed, explaining
121 the conflict and the packages involved. If --strict-peer-deps is set,
122 then this warning is treated as a failure. <!-- automatically gener‐
123 ated, do not edit manually --> <!-- see lib/utils/config/definitions.js
124 -->
125
126
127 package-lock
128 • Default: true
129
130 • Type: Boolean
131
132
133 If set to false, then ignore package-lock.json files when installing.
134 This will also prevent writing package-lock.json if save is true.
135
136 When package package-locks are disabled, automatic pruning of extrane‐
137 ous modules will also be disabled. To remove extraneous modules with
138 package-locks disabled use npm prune. <!-- automatically generated, do
139 not edit manually --> <!-- see lib/utils/config/definitions.js -->
140
141
142 omit
143 • Default: 'dev' if the NODE_ENV environment variable is set to 'pro‐
144 duction', otherwise empty.
145
146 • Type: "dev", "optional", or "peer" (can be set multiple times)
147
148
149 Dependency types to omit from the installation tree on disk.
150
151 Note that these dependencies are still resolved and added to the pack‐
152 age-lock.json or npm-shrinkwrap.json file. They are just not physically
153 installed on disk.
154
155 If a package type appears in both the --include and --omit lists, then
156 it will be included.
157
158 If the resulting omit list includes 'dev', then the NODE_ENV environ‐
159 ment variable will be set to 'production' for all lifecycle scripts.
160 <!-- automatically generated, do not edit manually --> <!-- see
161 lib/utils/config/definitions.js -->
162
163
164 ignore-scripts
165 • Default: false
166
167 • Type: Boolean
168
169
170 If true, npm does not run scripts specified in package.json files.
171
172 Note that commands explicitly intended to run a particular script, such
173 as npm start, npm stop, npm restart, npm test, and npm run-script will
174 still run their intended script if ignore-scripts is set, but they will
175 not run any pre- or post-scripts. <!-- automatically generated, do not
176 edit manually --> <!-- see lib/utils/config/definitions.js -->
177
178
179 audit
180 • Default: true
181
182 • Type: Boolean
183
184
185 When "true" submit audit reports alongside the current npm command to
186 the default registry and all registries configured for scopes. See the
187 documentation for npm help audit for details on what is submitted.
188 <!-- automatically generated, do not edit manually --> <!-- see
189 lib/utils/config/definitions.js -->
190
191
192 bin-links
193 • Default: true
194
195 • Type: Boolean
196
197
198 Tells npm to create symlinks (or .cmd shims on Windows) for package ex‐
199 ecutables.
200
201 Set to false to have it not do this. This can be used to work around
202 the fact that some file systems don't support symlinks, even on osten‐
203 sibly Unix systems. <!-- automatically generated, do not edit manually
204 --> <!-- see lib/utils/config/definitions.js -->
205
206
207 fund
208 • Default: true
209
210 • Type: Boolean
211
212
213 When "true" displays the message at the end of each npm install ac‐
214 knowledging the number of dependencies looking for funding. See npm
215 help npm fund for details. <!-- automatically generated, do not edit
216 manually --> <!-- see lib/utils/config/definitions.js -->
217
218
219 dry-run
220 • Default: false
221
222 • Type: Boolean
223
224
225 Indicates that you don't want npm to make any changes and that it
226 should only report what it would have done. This can be passed into any
227 of the commands that modify your local installation, eg, install, up‐
228 date, dedupe, uninstall, as well as pack and publish.
229
230 Note: This is NOT honored by other network related commands, eg
231 dist-tags, owner, etc. <!-- automatically generated, do not edit manu‐
232 ally --> <!-- see lib/utils/config/definitions.js -->
233
234
235 workspace
236 • Default:
237
238 • Type: String (can be set multiple times)
239
240
241 Enable running a command in the context of the configured workspaces of
242 the current project while filtering by running only the workspaces de‐
243 fined by this configuration option.
244
245 Valid values for the workspace config are either:
246
247 • Workspace names
248
249 • Path to a workspace directory
250
251 • Path to a parent workspace directory (will result to selecting all of
252 the nested workspaces)
253
254
255 When set for the npm init command, this may be set to the folder of a
256 workspace which does not yet exist, to create the folder and set it up
257 as a brand new workspace within the project.
258
259 This value is not exported to the environment for child processes.
260 <!-- automatically generated, do not edit manually --> <!-- see
261 lib/utils/config/definitions.js -->
262
263
264 workspaces
265 • Default: false
266
267 • Type: Boolean
268
269
270 Enable running a command in the context of all the configured
271 workspaces.
272
273 This value is not exported to the environment for child processes.
274 <!-- automatically generated, do not edit manually --> <!-- see
275 lib/utils/config/definitions.js -->
276
277 <!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
278
279
280 See Also
281 • npm help install
282
283 • npm help install-ci-test
284
285 • npm help test
286
287
288
289
290 October 2021 NPM-INSTALL-TEST(1)