• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Command-line API
2
3<!--introduced_in=v5.9.1-->
4
5<!--type=misc-->
6
7Node.js comes with a variety of CLI options. These options expose built-in
8debugging, multiple ways to execute scripts, and other helpful runtime options.
9
10To view this documentation as a manual page in a terminal, run `man node`.
11
12## Synopsis
13
14`node [options] [V8 options] [<program-entry-point> | -e "script" | -] [--] [arguments]`
15
16`node inspect [<program-entry-point> | -e "script" | <host>:<port>] …`
17
18`node --v8-options`
19
20Execute without arguments to start the [REPL][].
21
22For more info about `node inspect`, see the [debugger][] documentation.
23
24## Program entry point
25
26The program entry point is a specifier-like string. If the string is not an
27absolute path, it's resolved as a relative path from the current working
28directory. That path is then resolved by [CommonJS][] module loader. If no
29corresponding file is found, an error is thrown.
30
31If a file is found, its path will be passed to the [ECMAScript module loader][]
32under any of the following conditions:
33
34* The program was started with a command-line flag that forces the entry
35  point to be loaded with ECMAScript module loader.
36* The file has an `.mjs` extension.
37* The file does not have a `.cjs` extension, and the nearest parent
38  `package.json` file contains a top-level [`"type"`][] field with a value of
39  `"module"`.
40
41Otherwise, the file is loaded using the CommonJS module loader. See
42[Modules loaders][] for more details.
43
44### ECMAScript modules loader entry point caveat
45
46When loading [ECMAScript module loader][] loads the program entry point, the `node`
47command will only accept as input only files with `.js`, `.mjs`, or `.cjs`
48extensions; and with `.wasm` extensions when
49[`--experimental-wasm-modules`][] is enabled.
50
51## Options
52
53<!-- YAML
54changes:
55  - version: v10.12.0
56    pr-url: https://github.com/nodejs/node/pull/23020
57    description: Underscores instead of dashes are now allowed for
58                 Node.js options as well, in addition to V8 options.
59-->
60
61All options, including V8 options, allow words to be separated by both
62dashes (`-`) or underscores (`_`). For example, `--pending-deprecation` is
63equivalent to `--pending_deprecation`.
64
65If an option that takes a single value (such as `--max-http-header-size`) is
66passed more than once, then the last passed value is used. Options from the
67command line take precedence over options passed through the [`NODE_OPTIONS`][]
68environment variable.
69
70### `-`
71
72<!-- YAML
73added: v8.0.0
74-->
75
76Alias for stdin. Analogous to the use of `-` in other command-line utilities,
77meaning that the script is read from stdin, and the rest of the options
78are passed to that script.
79
80### `--`
81
82<!-- YAML
83added: v6.11.0
84-->
85
86Indicate the end of node options. Pass the rest of the arguments to the script.
87If no script filename or eval/print script is supplied prior to this, then
88the next argument is used as a script filename.
89
90### `--abort-on-uncaught-exception`
91
92<!-- YAML
93added: v0.10.8
94-->
95
96Aborting instead of exiting causes a core file to be generated for post-mortem
97analysis using a debugger (such as `lldb`, `gdb`, and `mdb`).
98
99If this flag is passed, the behavior can still be set to not abort through
100[`process.setUncaughtExceptionCaptureCallback()`][] (and through usage of the
101`node:domain` module that uses it).
102
103### `--build-snapshot`
104
105<!-- YAML
106added: v18.8.0
107-->
108
109> Stability: 1 - Experimental
110
111Generates a snapshot blob when the process exits and writes it to
112disk, which can be loaded later with `--snapshot-blob`.
113
114When building the snapshot, if `--snapshot-blob` is not specified,
115the generated blob will be written, by default, to `snapshot.blob`
116in the current working directory. Otherwise it will be written to
117the path specified by `--snapshot-blob`.
118
119```console
120$ echo "globalThis.foo = 'I am from the snapshot'" > snapshot.js
121
122# Run snapshot.js to initialize the application and snapshot the
123# state of it into snapshot.blob.
124$ node --snapshot-blob snapshot.blob --build-snapshot snapshot.js
125
126$ echo "console.log(globalThis.foo)" > index.js
127
128# Load the generated snapshot and start the application from index.js.
129$ node --snapshot-blob snapshot.blob index.js
130I am from the snapshot
131```
132
133The [`v8.startupSnapshot` API][] can be used to specify an entry point at
134snapshot building time, thus avoiding the need of an additional entry
135script at deserialization time:
136
137```console
138$ echo "require('v8').startupSnapshot.setDeserializeMainFunction(() => console.log('I am from the snapshot'))" > snapshot.js
139$ node --snapshot-blob snapshot.blob --build-snapshot snapshot.js
140$ node --snapshot-blob snapshot.blob
141I am from the snapshot
142```
143
144For more information, check out the [`v8.startupSnapshot` API][] documentation.
145
146Currently the support for run-time snapshot is experimental in that:
147
1481. User-land modules are not yet supported in the snapshot, so only
149   one single file can be snapshotted. Users can bundle their applications
150   into a single script with their bundler of choice before building
151   a snapshot, however.
1522. Only a subset of the built-in modules work in the snapshot, though the
153   Node.js core test suite checks that a few fairly complex applications
154   can be snapshotted. Support for more modules are being added. If any
155   crashes or buggy behaviors occur when building a snapshot, please file
156   a report in the [Node.js issue tracker][] and link to it in the
157   [tracking issue for user-land snapshots][].
158
159### `--completion-bash`
160
161<!-- YAML
162added: v10.12.0
163-->
164
165Print source-able bash completion script for Node.js.
166
167```console
168$ node --completion-bash > node_bash_completion
169$ source node_bash_completion
170```
171
172### `-C condition`, `--conditions=condition`
173
174<!-- YAML
175added:
176  - v14.9.0
177  - v12.19.0
178-->
179
180> Stability: 1 - Experimental
181
182Enable experimental support for custom [conditional exports][] resolution
183conditions.
184
185Any number of custom string condition names are permitted.
186
187The default Node.js conditions of `"node"`, `"default"`, `"import"`, and
188`"require"` will always apply as defined.
189
190For example, to run a module with "development" resolutions:
191
192```console
193$ node -C development app.js
194```
195
196### `--cpu-prof`
197
198<!-- YAML
199added: v12.0.0
200-->
201
202> Stability: 1 - Experimental
203
204Starts the V8 CPU profiler on start up, and writes the CPU profile to disk
205before exit.
206
207If `--cpu-prof-dir` is not specified, the generated profile is placed
208in the current working directory.
209
210If `--cpu-prof-name` is not specified, the generated profile is
211named `CPU.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.cpuprofile`.
212
213```console
214$ node --cpu-prof index.js
215$ ls *.cpuprofile
216CPU.20190409.202950.15293.0.0.cpuprofile
217```
218
219### `--cpu-prof-dir`
220
221<!-- YAML
222added: v12.0.0
223-->
224
225> Stability: 1 - Experimental
226
227Specify the directory where the CPU profiles generated by `--cpu-prof` will
228be placed.
229
230The default value is controlled by the
231[`--diagnostic-dir`][] command-line option.
232
233### `--cpu-prof-interval`
234
235<!-- YAML
236added: v12.2.0
237-->
238
239> Stability: 1 - Experimental
240
241Specify the sampling interval in microseconds for the CPU profiles generated
242by `--cpu-prof`. The default is 1000 microseconds.
243
244### `--cpu-prof-name`
245
246<!-- YAML
247added: v12.0.0
248-->
249
250> Stability: 1 - Experimental
251
252Specify the file name of the CPU profile generated by `--cpu-prof`.
253
254### `--diagnostic-dir=directory`
255
256Set the directory to which all diagnostic output files are written.
257Defaults to current working directory.
258
259Affects the default output directory of:
260
261* [`--cpu-prof-dir`][]
262* [`--heap-prof-dir`][]
263* [`--redirect-warnings`][]
264
265### `--disable-proto=mode`
266
267<!-- YAML
268added:
269 - v13.12.0
270 - v12.17.0
271-->
272
273Disable the `Object.prototype.__proto__` property. If `mode` is `delete`, the
274property is removed entirely. If `mode` is `throw`, accesses to the
275property throw an exception with the code `ERR_PROTO_ACCESS`.
276
277### `--disallow-code-generation-from-strings`
278
279<!-- YAML
280added: v9.8.0
281-->
282
283Make built-in language features like `eval` and `new Function` that generate
284code from strings throw an exception instead. This does not affect the Node.js
285`node:vm` module.
286
287### `--dns-result-order=order`
288
289<!-- YAML
290added:
291  - v16.4.0
292  - v14.18.0
293changes:
294  - version: v17.0.0
295    pr-url: https://github.com/nodejs/node/pull/39987
296    description: Changed default value to `verbatim`.
297-->
298
299Set the default value of `verbatim` in [`dns.lookup()`][] and
300[`dnsPromises.lookup()`][]. The value could be:
301
302* `ipv4first`: sets default `verbatim` `false`.
303* `verbatim`: sets default `verbatim` `true`.
304
305The default is `verbatim` and [`dns.setDefaultResultOrder()`][] have higher
306priority than `--dns-result-order`.
307
308### `--enable-fips`
309
310<!-- YAML
311added: v6.0.0
312-->
313
314Enable FIPS-compliant crypto at startup. (Requires Node.js to be built
315against FIPS-compatible OpenSSL.)
316
317### `--enable-network-family-autoselection`
318
319<!-- YAML
320added: v18.18.0
321-->
322
323Enables the family autoselection algorithm unless connection options explicitly
324disables it.
325
326### `--enable-source-maps`
327
328<!-- YAML
329added: v12.12.0
330changes:
331  - version:
332      - v15.11.0
333      - v14.18.0
334    pr-url: https://github.com/nodejs/node/pull/37362
335    description: This API is no longer experimental.
336-->
337
338Enable [Source Map v3][Source Map] support for stack traces.
339
340When using a transpiler, such as TypeScript, stack traces thrown by an
341application reference the transpiled code, not the original source position.
342`--enable-source-maps` enables caching of Source Maps and makes a best
343effort to report stack traces relative to the original source file.
344
345Overriding `Error.prepareStackTrace` prevents `--enable-source-maps` from
346modifying the stack trace.
347
348Note, enabling source maps can introduce latency to your application
349when `Error.stack` is accessed. If you access `Error.stack` frequently
350in your application, take into account the performance implications
351of `--enable-source-maps`.
352
353### `--experimental-global-customevent`
354
355<!-- YAML
356added: v18.7.0
357-->
358
359Expose the [CustomEvent Web API][] on the global scope.
360
361### `--experimental-global-webcrypto`
362
363<!-- YAML
364added: v17.6.0
365-->
366
367Expose the [Web Crypto API][] on the global scope.
368
369### `--experimental-import-meta-resolve`
370
371<!-- YAML
372added:
373  - v13.9.0
374  - v12.16.2
375-->
376
377Enable experimental `import.meta.resolve()` support.
378
379### `--experimental-loader=module`
380
381<!-- YAML
382added: v8.8.0
383changes:
384  - version: v12.11.1
385    pr-url: https://github.com/nodejs/node/pull/29752
386    description: This flag was renamed from `--loader` to
387                 `--experimental-loader`.
388-->
389
390Specify the `module` of a custom experimental [ECMAScript module loader][].
391`module` may be any string accepted as an [`import` specifier][].
392
393### `--experimental-network-imports`
394
395<!-- YAML
396added: v17.6.0
397-->
398
399> Stability: 1 - Experimental
400
401Enable experimental support for the `https:` protocol in `import` specifiers.
402
403### `--experimental-policy`
404
405<!-- YAML
406added: v11.8.0
407-->
408
409Use the specified file as a security policy.
410
411### `--no-experimental-fetch`
412
413<!-- YAML
414added: v18.0.0
415-->
416
417Disable experimental support for the [Fetch API][].
418
419### `--no-experimental-repl-await`
420
421<!-- YAML
422added: v16.6.0
423-->
424
425Use this flag to disable top-level await in REPL.
426
427### `--experimental-shadow-realm`
428
429<!-- YAML
430added: v18.13.0
431-->
432
433Use this flag to enable [ShadowRealm][] support.
434
435### `--experimental-specifier-resolution=mode`
436
437<!-- YAML
438added:
439 - v13.4.0
440 - v12.16.0
441-->
442
443Sets the resolution algorithm for resolving ES module specifiers. Valid options
444are `explicit` and `node`.
445
446The default is `explicit`, which requires providing the full path to a
447module. The `node` mode enables support for optional file extensions and
448the ability to import a directory that has an index file.
449
450See [customizing ESM specifier resolution][] for example usage.
451
452### `--experimental-test-coverage`
453
454<!-- YAML
455added: v18.15.0
456changes:
457  - version: v18.17.0
458    pr-url: https://github.com/nodejs/node/pull/47686
459    description: This option can be used with `--test`.
460-->
461
462When used in conjunction with the `node:test` module, a code coverage report is
463generated as part of the test runner output. If no tests are run, a coverage
464report is not generated. See the documentation on
465[collecting code coverage from tests][] for more details.
466
467### `--experimental-vm-modules`
468
469<!-- YAML
470added: v9.6.0
471-->
472
473Enable experimental ES Module support in the `node:vm` module.
474
475### `--experimental-wasi-unstable-preview1`
476
477<!-- YAML
478added:
479  - v13.3.0
480  - v12.16.0
481changes:
482  - version: v18.17.0
483    pr-url: https://github.com/nodejs/node/pull/47286
484    description: This option is no longer required as WASI is
485                 enabled by default, but can still be passed.
486  - version: v13.6.0
487    pr-url: https://github.com/nodejs/node/pull/30980
488    description: changed from `--experimental-wasi-unstable-preview0` to
489                 `--experimental-wasi-unstable-preview1`.
490-->
491
492Enable experimental WebAssembly System Interface (WASI) support.
493
494### `--experimental-wasm-modules`
495
496<!-- YAML
497added: v12.3.0
498-->
499
500Enable experimental WebAssembly module support.
501
502### `--force-context-aware`
503
504<!-- YAML
505added: v12.12.0
506-->
507
508Disable loading native addons that are not [context-aware][].
509
510### `--force-fips`
511
512<!-- YAML
513added: v6.0.0
514-->
515
516Force FIPS-compliant crypto on startup. (Cannot be disabled from script code.)
517(Same requirements as `--enable-fips`.)
518
519### `--frozen-intrinsics`
520
521<!-- YAML
522added: v11.12.0
523-->
524
525> Stability: 1 - Experimental
526
527Enable experimental frozen intrinsics like `Array` and `Object`.
528
529Only the root context is supported. There is no guarantee that
530`globalThis.Array` is indeed the default intrinsic reference. Code may break
531under this flag.
532
533To allow polyfills to be added,
534[`--require`][] and [`--import`][] both run before freezing intrinsics.
535
536### `--force-node-api-uncaught-exceptions-policy`
537
538<!-- YAML
539added: v18.3.0
540-->
541
542Enforces `uncaughtException` event on Node-API asynchronous callbacks.
543
544To prevent from an existing add-on from crashing the process, this flag is not
545enabled by default. In the future, this flag will be enabled by default to
546enforce the correct behavior.
547
548### `--heapsnapshot-near-heap-limit=max_count`
549
550<!-- YAML
551added:
552  - v15.1.0
553  - v14.18.0
554-->
555
556> Stability: 1 - Experimental
557
558Writes a V8 heap snapshot to disk when the V8 heap usage is approaching the
559heap limit. `count` should be a non-negative integer (in which case
560Node.js will write no more than `max_count` snapshots to disk).
561
562When generating snapshots, garbage collection may be triggered and bring
563the heap usage down. Therefore multiple snapshots may be written to disk
564before the Node.js instance finally runs out of memory. These heap snapshots
565can be compared to determine what objects are being allocated during the
566time consecutive snapshots are taken. It's not guaranteed that Node.js will
567write exactly `max_count` snapshots to disk, but it will try
568its best to generate at least one and up to `max_count` snapshots before the
569Node.js instance runs out of memory when `max_count` is greater than `0`.
570
571Generating V8 snapshots takes time and memory (both memory managed by the
572V8 heap and native memory outside the V8 heap). The bigger the heap is,
573the more resources it needs. Node.js will adjust the V8 heap to accommodate
574the additional V8 heap memory overhead, and try its best to avoid using up
575all the memory available to the process. When the process uses
576more memory than the system deems appropriate, the process may be terminated
577abruptly by the system, depending on the system configuration.
578
579```console
580$ node --max-old-space-size=100 --heapsnapshot-near-heap-limit=3 index.js
581Wrote snapshot to Heap.20200430.100036.49580.0.001.heapsnapshot
582Wrote snapshot to Heap.20200430.100037.49580.0.002.heapsnapshot
583Wrote snapshot to Heap.20200430.100038.49580.0.003.heapsnapshot
584
585<--- Last few GCs --->
586
587[49580:0x110000000]     4826 ms: Mark-sweep 130.6 (147.8) -> 130.5 (147.8) MB, 27.4 / 0.0 ms  (average mu = 0.126, current mu = 0.034) allocation failure scavenge might not succeed
588[49580:0x110000000]     4845 ms: Mark-sweep 130.6 (147.8) -> 130.6 (147.8) MB, 18.8 / 0.0 ms  (average mu = 0.088, current mu = 0.031) allocation failure scavenge might not succeed
589
590
591<--- JS stacktrace --->
592
593FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
594....
595```
596
597### `--heapsnapshot-signal=signal`
598
599<!-- YAML
600added: v12.0.0
601-->
602
603Enables a signal handler that causes the Node.js process to write a heap dump
604when the specified signal is received. `signal` must be a valid signal name.
605Disabled by default.
606
607```console
608$ node --heapsnapshot-signal=SIGUSR2 index.js &
609$ ps aux
610USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
611node         1  5.5  6.1 787252 247004 ?       Ssl  16:43   0:02 node --heapsnapshot-signal=SIGUSR2 index.js
612$ kill -USR2 1
613$ ls
614Heap.20190718.133405.15554.0.001.heapsnapshot
615```
616
617### `--heap-prof`
618
619<!-- YAML
620added: v12.4.0
621-->
622
623> Stability: 1 - Experimental
624
625Starts the V8 heap profiler on start up, and writes the heap profile to disk
626before exit.
627
628If `--heap-prof-dir` is not specified, the generated profile is placed
629in the current working directory.
630
631If `--heap-prof-name` is not specified, the generated profile is
632named `Heap.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.heapprofile`.
633
634```console
635$ node --heap-prof index.js
636$ ls *.heapprofile
637Heap.20190409.202950.15293.0.001.heapprofile
638```
639
640### `--heap-prof-dir`
641
642<!-- YAML
643added: v12.4.0
644-->
645
646> Stability: 1 - Experimental
647
648Specify the directory where the heap profiles generated by `--heap-prof` will
649be placed.
650
651The default value is controlled by the
652[`--diagnostic-dir`][] command-line option.
653
654### `--heap-prof-interval`
655
656<!-- YAML
657added: v12.4.0
658-->
659
660> Stability: 1 - Experimental
661
662Specify the average sampling interval in bytes for the heap profiles generated
663by `--heap-prof`. The default is 512 \* 1024 bytes.
664
665### `--heap-prof-name`
666
667<!-- YAML
668added: v12.4.0
669-->
670
671> Stability: 1 - Experimental
672
673Specify the file name of the heap profile generated by `--heap-prof`.
674
675### `--icu-data-dir=file`
676
677<!-- YAML
678added: v0.11.15
679-->
680
681Specify ICU data load path. (Overrides `NODE_ICU_DATA`.)
682
683### `--import=module`
684
685<!-- YAML
686added: v18.18.0
687-->
688
689> Stability: 1 - Experimental
690
691Preload the specified module at startup.
692
693Follows [ECMAScript module][] resolution rules.
694Use [`--require`][] to load a [CommonJS module][].
695Modules preloaded with `--require` will run before modules preloaded with `--import`.
696
697### `--input-type=type`
698
699<!-- YAML
700added: v12.0.0
701-->
702
703This configures Node.js to interpret string input as CommonJS or as an ES
704module. String input is input via `--eval`, `--print`, or `STDIN`.
705
706Valid values are `"commonjs"` and `"module"`. The default is `"commonjs"`.
707
708The REPL does not support this option.
709
710### `--inspect-brk[=[host:]port]`
711
712<!-- YAML
713added: v7.6.0
714-->
715
716Activate inspector on `host:port` and break at start of user script.
717Default `host:port` is `127.0.0.1:9229`.
718
719### `--inspect-port=[host:]port`
720
721<!-- YAML
722added: v7.6.0
723-->
724
725Set the `host:port` to be used when the inspector is activated.
726Useful when activating the inspector by sending the `SIGUSR1` signal.
727
728Default host is `127.0.0.1`.
729
730See the [security warning][] below regarding the `host`
731parameter usage.
732
733### `--inspect[=[host:]port]`
734
735<!-- YAML
736added: v6.3.0
737-->
738
739Activate inspector on `host:port`. Default is `127.0.0.1:9229`.
740
741V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug
742and profile Node.js instances. The tools attach to Node.js instances via a
743tcp port and communicate using the [Chrome DevTools Protocol][].
744
745<!-- Anchor to make sure old links find a target -->
746
747<a id="inspector_security"></a>
748
749#### Warning: binding inspector to a public IP:port combination is insecure
750
751Binding the inspector to a public IP (including `0.0.0.0`) with an open port is
752insecure, as it allows external hosts to connect to the inspector and perform
753a [remote code execution][] attack.
754
755If specifying a host, make sure that either:
756
757* The host is not accessible from public networks.
758* A firewall disallows unwanted connections on the port.
759
760**More specifically, `--inspect=0.0.0.0` is insecure if the port (`9229` by
761default) is not firewall-protected.**
762
763See the [debugging security implications][] section for more information.
764
765### `--inspect-publish-uid=stderr,http`
766
767Specify ways of the inspector web socket url exposure.
768
769By default inspector websocket url is available in stderr and under `/json/list`
770endpoint on `http://host:port/json/list`.
771
772### `--insecure-http-parser`
773
774<!-- YAML
775added:
776 - v13.4.0
777 - v12.15.0
778 - v10.19.0
779-->
780
781Use an insecure HTTP parser that accepts invalid HTTP headers. This may allow
782interoperability with non-conformant HTTP implementations. It may also allow
783request smuggling and other HTTP attacks that rely on invalid headers being
784accepted. Avoid using this option.
785
786### `--jitless`
787
788<!-- YAML
789added: v12.0.0
790-->
791
792Disable [runtime allocation of executable memory][jitless]. This may be
793required on some platforms for security reasons. It can also reduce attack
794surface on other platforms, but the performance impact may be severe.
795
796This flag is inherited from V8 and is subject to change upstream. It may
797disappear in a non-semver-major release.
798
799### `--max-http-header-size=size`
800
801<!-- YAML
802added:
803 - v11.6.0
804 - v10.15.0
805changes:
806  - version: v13.13.0
807    pr-url: https://github.com/nodejs/node/pull/32520
808    description: Change maximum default size of HTTP headers from 8 KiB to 16 KiB.
809-->
810
811Specify the maximum size, in bytes, of HTTP headers. Defaults to 16 KiB.
812
813### `--napi-modules`
814
815<!-- YAML
816added: v7.10.0
817-->
818
819This option is a no-op. It is kept for compatibility.
820
821### `--no-addons`
822
823<!-- YAML
824added:
825  - v16.10.0
826  - v14.19.0
827-->
828
829Disable the `node-addons` exports condition as well as disable loading
830native addons. When `--no-addons` is specified, calling `process.dlopen` or
831requiring a native C++ addon will fail and throw an exception.
832
833### `--no-deprecation`
834
835<!-- YAML
836added: v0.8.0
837-->
838
839Silence deprecation warnings.
840
841### `--no-extra-info-on-fatal-exception`
842
843<!-- YAML
844added: v17.0.0
845-->
846
847Hide extra information on fatal exception that causes exit.
848
849### `--no-force-async-hooks-checks`
850
851<!-- YAML
852added: v9.0.0
853-->
854
855Disables runtime checks for `async_hooks`. These will still be enabled
856dynamically when `async_hooks` is enabled.
857
858### `--no-global-search-paths`
859
860<!-- YAML
861added: v16.10.0
862-->
863
864Do not search modules from global paths like `$HOME/.node_modules` and
865`$NODE_PATH`.
866
867### `--no-warnings`
868
869<!-- YAML
870added: v6.0.0
871-->
872
873Silence all process warnings (including deprecations).
874
875### `--node-memory-debug`
876
877<!-- YAML
878added:
879  - v15.0.0
880  - v14.18.0
881-->
882
883Enable extra debug checks for memory leaks in Node.js internals. This is
884usually only useful for developers debugging Node.js itself.
885
886### `--openssl-config=file`
887
888<!-- YAML
889added: v6.9.0
890-->
891
892Load an OpenSSL configuration file on startup. Among other uses, this can be
893used to enable FIPS-compliant crypto if Node.js is built
894against FIPS-enabled OpenSSL.
895
896### `--openssl-shared-config`
897
898<!-- YAML
899added: v18.5.0
900-->
901
902Enable OpenSSL default configuration section, `openssl_conf` to be read from
903the OpenSSL configuration file. The default configuration file is named
904`openssl.cnf` but this can be changed using the environment variable
905`OPENSSL_CONF`, or by using the command line option `--openssl-config`.
906The location of the default OpenSSL configuration file depends on how OpenSSL
907is being linked to Node.js. Sharing the OpenSSL configuration may have unwanted
908implications and it is recommended to use a configuration section specific to
909Node.js which is `nodejs_conf` and is default when this option is not used.
910
911### `--openssl-legacy-provider`
912
913<!-- YAML
914added: v17.0.0
915-->
916
917Enable OpenSSL 3.0 legacy provider. For more information please see
918[OSSL\_PROVIDER-legacy][OSSL_PROVIDER-legacy].
919
920### `--pending-deprecation`
921
922<!-- YAML
923added: v8.0.0
924-->
925
926Emit pending deprecation warnings.
927
928Pending deprecations are generally identical to a runtime deprecation with the
929notable exception that they are turned _off_ by default and will not be emitted
930unless either the `--pending-deprecation` command-line flag, or the
931`NODE_PENDING_DEPRECATION=1` environment variable, is set. Pending deprecations
932are used to provide a kind of selective "early warning" mechanism that
933developers may leverage to detect deprecated API usage.
934
935### `--policy-integrity=sri`
936
937<!-- YAML
938added: v12.7.0
939-->
940
941> Stability: 1 - Experimental
942
943Instructs Node.js to error prior to running any code if the policy does not have
944the specified integrity. It expects a [Subresource Integrity][] string as a
945parameter.
946
947### `--preserve-symlinks`
948
949<!-- YAML
950added: v6.3.0
951-->
952
953Instructs the module loader to preserve symbolic links when resolving and
954caching modules.
955
956By default, when Node.js loads a module from a path that is symbolically linked
957to a different on-disk location, Node.js will dereference the link and use the
958actual on-disk "real path" of the module as both an identifier and as a root
959path to locate other dependency modules. In most cases, this default behavior
960is acceptable. However, when using symbolically linked peer dependencies, as
961illustrated in the example below, the default behavior causes an exception to
962be thrown if `moduleA` attempts to require `moduleB` as a peer dependency:
963
964```text
965{appDir}
966 ├── app
967 │   ├── index.js
968 │   └── node_modules
969 │       ├── moduleA -> {appDir}/moduleA
970 │       └── moduleB
971 │           ├── index.js
972 │           └── package.json
973 └── moduleA
974     ├── index.js
975     └── package.json
976```
977
978The `--preserve-symlinks` command-line flag instructs Node.js to use the
979symlink path for modules as opposed to the real path, allowing symbolically
980linked peer dependencies to be found.
981
982Note, however, that using `--preserve-symlinks` can have other side effects.
983Specifically, symbolically linked _native_ modules can fail to load if those
984are linked from more than one location in the dependency tree (Node.js would
985see those as two separate modules and would attempt to load the module multiple
986times, causing an exception to be thrown).
987
988The `--preserve-symlinks` flag does not apply to the main module, which allows
989`node --preserve-symlinks node_module/.bin/<foo>` to work. To apply the same
990behavior for the main module, also use `--preserve-symlinks-main`.
991
992### `--preserve-symlinks-main`
993
994<!-- YAML
995added: v10.2.0
996-->
997
998Instructs the module loader to preserve symbolic links when resolving and
999caching the main module (`require.main`).
1000
1001This flag exists so that the main module can be opted-in to the same behavior
1002that `--preserve-symlinks` gives to all other imports; they are separate flags,
1003however, for backward compatibility with older Node.js versions.
1004
1005`--preserve-symlinks-main` does not imply `--preserve-symlinks`; use
1006`--preserve-symlinks-main` in addition to
1007`--preserve-symlinks` when it is not desirable to follow symlinks before
1008resolving relative paths.
1009
1010See [`--preserve-symlinks`][] for more information.
1011
1012### `--prof`
1013
1014<!-- YAML
1015added: v2.0.0
1016-->
1017
1018Generate V8 profiler output.
1019
1020### `--prof-process`
1021
1022<!-- YAML
1023added: v5.2.0
1024-->
1025
1026Process V8 profiler output generated using the V8 option `--prof`.
1027
1028### `--redirect-warnings=file`
1029
1030<!-- YAML
1031added: v8.0.0
1032-->
1033
1034Write process warnings to the given file instead of printing to stderr. The
1035file will be created if it does not exist, and will be appended to if it does.
1036If an error occurs while attempting to write the warning to the file, the
1037warning will be written to stderr instead.
1038
1039The `file` name may be an absolute path. If it is not, the default directory it
1040will be written to is controlled by the
1041[`--diagnostic-dir`][] command-line option.
1042
1043### `--report-compact`
1044
1045<!-- YAML
1046added:
1047 - v13.12.0
1048 - v12.17.0
1049-->
1050
1051Write reports in a compact format, single-line JSON, more easily consumable
1052by log processing systems than the default multi-line format designed for
1053human consumption.
1054
1055### `--report-dir=directory`, `report-directory=directory`
1056
1057<!-- YAML
1058added: v11.8.0
1059changes:
1060  - version:
1061     - v13.12.0
1062     - v12.17.0
1063    pr-url: https://github.com/nodejs/node/pull/32242
1064    description: This option is no longer experimental.
1065  - version: v12.0.0
1066    pr-url: https://github.com/nodejs/node/pull/27312
1067    description: Changed from `--diagnostic-report-directory` to
1068                 `--report-directory`.
1069-->
1070
1071Location at which the report will be generated.
1072
1073### `--report-filename=filename`
1074
1075<!-- YAML
1076added: v11.8.0
1077changes:
1078  - version:
1079     - v13.12.0
1080     - v12.17.0
1081    pr-url: https://github.com/nodejs/node/pull/32242
1082    description: This option is no longer experimental.
1083  - version: v12.0.0
1084    pr-url: https://github.com/nodejs/node/pull/27312
1085    description: changed from `--diagnostic-report-filename` to
1086                 `--report-filename`.
1087-->
1088
1089Name of the file to which the report will be written.
1090
1091If the filename is set to `'stdout'` or `'stderr'`, the report is written to
1092the stdout or stderr of the process respectively.
1093
1094### `--report-on-fatalerror`
1095
1096<!-- YAML
1097added: v11.8.0
1098changes:
1099  - version:
1100    - v14.0.0
1101    - v13.14.0
1102    - v12.17.0
1103    pr-url: https://github.com/nodejs/node/pull/32496
1104    description: This option is no longer experimental.
1105  - version: v12.0.0
1106    pr-url: https://github.com/nodejs/node/pull/27312
1107    description: changed from `--diagnostic-report-on-fatalerror` to
1108                 `--report-on-fatalerror`.
1109-->
1110
1111Enables the report to be triggered on fatal errors (internal errors within
1112the Node.js runtime such as out of memory) that lead to termination of the
1113application. Useful to inspect various diagnostic data elements such as heap,
1114stack, event loop state, resource consumption etc. to reason about the fatal
1115error.
1116
1117### `--report-on-signal`
1118
1119<!-- YAML
1120added: v11.8.0
1121changes:
1122  - version:
1123     - v13.12.0
1124     - v12.17.0
1125    pr-url: https://github.com/nodejs/node/pull/32242
1126    description: This option is no longer experimental.
1127  - version: v12.0.0
1128    pr-url: https://github.com/nodejs/node/pull/27312
1129    description: changed from `--diagnostic-report-on-signal` to
1130                 `--report-on-signal`.
1131-->
1132
1133Enables report to be generated upon receiving the specified (or predefined)
1134signal to the running Node.js process. The signal to trigger the report is
1135specified through `--report-signal`.
1136
1137### `--report-signal=signal`
1138
1139<!-- YAML
1140added: v11.8.0
1141changes:
1142  - version:
1143     - v13.12.0
1144     - v12.17.0
1145    pr-url: https://github.com/nodejs/node/pull/32242
1146    description: This option is no longer experimental.
1147  - version: v12.0.0
1148    pr-url: https://github.com/nodejs/node/pull/27312
1149    description: changed from `--diagnostic-report-signal` to
1150                 `--report-signal`.
1151-->
1152
1153Sets or resets the signal for report generation (not supported on Windows).
1154Default signal is `SIGUSR2`.
1155
1156### `--report-uncaught-exception`
1157
1158<!-- YAML
1159added: v11.8.0
1160changes:
1161  - version: v18.8.0
1162    pr-url: https://github.com/nodejs/node/pull/44208
1163    description: Report is not generated if the uncaught exception is handled.
1164  - version:
1165     - v13.12.0
1166     - v12.17.0
1167    pr-url: https://github.com/nodejs/node/pull/32242
1168    description: This option is no longer experimental.
1169  - version: v12.0.0
1170    pr-url: https://github.com/nodejs/node/pull/27312
1171    description: changed from `--diagnostic-report-uncaught-exception` to
1172                 `--report-uncaught-exception`.
1173-->
1174
1175Enables report to be generated when the process exits due to an uncaught
1176exception. Useful when inspecting the JavaScript stack in conjunction with
1177native stack and other runtime environment data.
1178
1179### `--secure-heap=n`
1180
1181<!-- YAML
1182added: v15.6.0
1183-->
1184
1185Initializes an OpenSSL secure heap of `n` bytes. When initialized, the
1186secure heap is used for selected types of allocations within OpenSSL
1187during key generation and other operations. This is useful, for instance,
1188to prevent sensitive information from leaking due to pointer overruns
1189or underruns.
1190
1191The secure heap is a fixed size and cannot be resized at runtime so,
1192if used, it is important to select a large enough heap to cover all
1193application uses.
1194
1195The heap size given must be a power of two. Any value less than 2
1196will disable the secure heap.
1197
1198The secure heap is disabled by default.
1199
1200The secure heap is not available on Windows.
1201
1202See [`CRYPTO_secure_malloc_init`][] for more details.
1203
1204### `--secure-heap-min=n`
1205
1206<!-- YAML
1207added: v15.6.0
1208-->
1209
1210When using `--secure-heap`, the `--secure-heap-min` flag specifies the
1211minimum allocation from the secure heap. The minimum value is `2`.
1212The maximum value is the lesser of `--secure-heap` or `2147483647`.
1213The value given must be a power of two.
1214
1215### `--snapshot-blob=path`
1216
1217<!-- YAML
1218added: v18.8.0
1219-->
1220
1221> Stability: 1 - Experimental
1222
1223When used with `--build-snapshot`, `--snapshot-blob` specifies the path
1224where the generated snapshot blob is written to. If not specified, the
1225generated blob is written to `snapshot.blob` in the current working directory.
1226
1227When used without `--build-snapshot`, `--snapshot-blob` specifies the
1228path to the blob that is used to restore the application state.
1229
1230When loading a snapshot, Node.js checks that:
1231
12321. The version, architecture, and platform of the running Node.js binary
1233   are exactly the same as that of the binary that generates the snapshot.
12342. The V8 flags and CPU features are compatible with that of the binary
1235   that generates the snapshot.
1236
1237If they don't match, Node.js refuses to load the snapshot and exits with
1238status code 1.
1239
1240### `--test`
1241
1242<!-- YAML
1243added: v18.1.0
1244changes:
1245  - version: v18.13.0
1246    pr-url: https://github.com/nodejs/node/pull/45214
1247    description: Test runner now supports running in watch mode.
1248-->
1249
1250Starts the Node.js command line test runner. This flag cannot be combined with
1251`--watch-path`, `--check`, `--eval`, `--interactive`, or the inspector.
1252See the documentation on [running tests from the command line][]
1253for more details.
1254
1255### `--test-name-pattern`
1256
1257<!-- YAML
1258added: v18.11.0
1259-->
1260
1261A regular expression that configures the test runner to only execute tests
1262whose name matches the provided pattern. See the documentation on
1263[filtering tests by name][] for more details.
1264
1265### `--test-reporter`
1266
1267<!-- YAML
1268added: v18.15.0
1269-->
1270
1271A test reporter to use when running tests. See the documentation on
1272[test reporters][] for more details.
1273
1274### `--test-reporter-destination`
1275
1276<!-- YAML
1277added: v18.15.0
1278-->
1279
1280The destination for the corresponding test reporter. See the documentation on
1281[test reporters][] for more details.
1282
1283### `--test-only`
1284
1285<!-- YAML
1286added: v18.0.0
1287-->
1288
1289Configures the test runner to only execute top level tests that have the `only`
1290option set.
1291
1292### `--throw-deprecation`
1293
1294<!-- YAML
1295added: v0.11.14
1296-->
1297
1298Throw errors for deprecations.
1299
1300### `--title=title`
1301
1302<!-- YAML
1303added: v10.7.0
1304-->
1305
1306Set `process.title` on startup.
1307
1308### `--tls-cipher-list=list`
1309
1310<!-- YAML
1311added: v4.0.0
1312-->
1313
1314Specify an alternative default TLS cipher list. Requires Node.js to be built
1315with crypto support (default).
1316
1317### `--tls-keylog=file`
1318
1319<!-- YAML
1320added:
1321 - v13.2.0
1322 - v12.16.0
1323-->
1324
1325Log TLS key material to a file. The key material is in NSS `SSLKEYLOGFILE`
1326format and can be used by software (such as Wireshark) to decrypt the TLS
1327traffic.
1328
1329### `--tls-max-v1.2`
1330
1331<!-- YAML
1332added:
1333 - v12.0.0
1334 - v10.20.0
1335-->
1336
1337Set [`tls.DEFAULT_MAX_VERSION`][] to 'TLSv1.2'. Use to disable support for
1338TLSv1.3.
1339
1340### `--tls-max-v1.3`
1341
1342<!-- YAML
1343added: v12.0.0
1344-->
1345
1346Set default [`tls.DEFAULT_MAX_VERSION`][] to 'TLSv1.3'. Use to enable support
1347for TLSv1.3.
1348
1349### `--tls-min-v1.0`
1350
1351<!-- YAML
1352added:
1353 - v12.0.0
1354 - v10.20.0
1355-->
1356
1357Set default [`tls.DEFAULT_MIN_VERSION`][] to 'TLSv1'. Use for compatibility with
1358old TLS clients or servers.
1359
1360### `--tls-min-v1.1`
1361
1362<!-- YAML
1363added:
1364 - v12.0.0
1365 - v10.20.0
1366-->
1367
1368Set default [`tls.DEFAULT_MIN_VERSION`][] to 'TLSv1.1'. Use for compatibility
1369with old TLS clients or servers.
1370
1371### `--tls-min-v1.2`
1372
1373<!-- YAML
1374added:
1375 - v12.2.0
1376 - v10.20.0
1377-->
1378
1379Set default [`tls.DEFAULT_MIN_VERSION`][] to 'TLSv1.2'. This is the default for
138012.x and later, but the option is supported for compatibility with older Node.js
1381versions.
1382
1383### `--tls-min-v1.3`
1384
1385<!-- YAML
1386added: v12.0.0
1387-->
1388
1389Set default [`tls.DEFAULT_MIN_VERSION`][] to 'TLSv1.3'. Use to disable support
1390for TLSv1.2, which is not as secure as TLSv1.3.
1391
1392### `--trace-atomics-wait`
1393
1394<!-- YAML
1395added: v14.3.0
1396deprecated: v18.8.0
1397-->
1398
1399> Stability: 0 - Deprecated
1400
1401Print short summaries of calls to [`Atomics.wait()`][] to stderr.
1402The output could look like this:
1403
1404```text
1405(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 1, inf) started
1406(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 1, inf) did not wait because the values mismatched
1407(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 0, 10) started
1408(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 0, 10) timed out
1409(node:15701) [Thread 0] Atomics.wait(&lt;address> + 4, 0, inf) started
1410(node:15701) [Thread 1] Atomics.wait(&lt;address> + 4, -1, inf) started
1411(node:15701) [Thread 0] Atomics.wait(&lt;address> + 4, 0, inf) was woken up by another thread
1412(node:15701) [Thread 1] Atomics.wait(&lt;address> + 4, -1, inf) was woken up by another thread
1413```
1414
1415The fields here correspond to:
1416
1417* The thread id as given by [`worker_threads.threadId`][]
1418* The base address of the `SharedArrayBuffer` in question, as well as the
1419  byte offset corresponding to the index passed to `Atomics.wait()`
1420* The expected value that was passed to `Atomics.wait()`
1421* The timeout passed to `Atomics.wait`
1422
1423### `--trace-deprecation`
1424
1425<!-- YAML
1426added: v0.8.0
1427-->
1428
1429Print stack traces for deprecations.
1430
1431### `--trace-event-categories`
1432
1433<!-- YAML
1434added: v7.7.0
1435-->
1436
1437A comma separated list of categories that should be traced when trace event
1438tracing is enabled using `--trace-events-enabled`.
1439
1440### `--trace-event-file-pattern`
1441
1442<!-- YAML
1443added: v9.8.0
1444-->
1445
1446Template string specifying the filepath for the trace event data, it
1447supports `${rotation}` and `${pid}`.
1448
1449### `--trace-events-enabled`
1450
1451<!-- YAML
1452added: v7.7.0
1453-->
1454
1455Enables the collection of trace event tracing information.
1456
1457### `--trace-exit`
1458
1459<!-- YAML
1460added:
1461 - v13.5.0
1462 - v12.16.0
1463-->
1464
1465Prints a stack trace whenever an environment is exited proactively,
1466i.e. invoking `process.exit()`.
1467
1468### `--trace-sigint`
1469
1470<!-- YAML
1471added:
1472 - v13.9.0
1473 - v12.17.0
1474-->
1475
1476Prints a stack trace on SIGINT.
1477
1478### `--trace-sync-io`
1479
1480<!-- YAML
1481added: v2.1.0
1482-->
1483
1484Prints a stack trace whenever synchronous I/O is detected after the first turn
1485of the event loop.
1486
1487### `--trace-tls`
1488
1489<!-- YAML
1490added: v12.2.0
1491-->
1492
1493Prints TLS packet trace information to `stderr`. This can be used to debug TLS
1494connection problems.
1495
1496### `--trace-uncaught`
1497
1498<!-- YAML
1499added: v13.1.0
1500-->
1501
1502Print stack traces for uncaught exceptions; usually, the stack trace associated
1503with the creation of an `Error` is printed, whereas this makes Node.js also
1504print the stack trace associated with throwing the value (which does not need
1505to be an `Error` instance).
1506
1507Enabling this option may affect garbage collection behavior negatively.
1508
1509### `--trace-warnings`
1510
1511<!-- YAML
1512added: v6.0.0
1513-->
1514
1515Print stack traces for process warnings (including deprecations).
1516
1517### `--track-heap-objects`
1518
1519<!-- YAML
1520added: v2.4.0
1521-->
1522
1523Track heap object allocations for heap snapshots.
1524
1525### `--unhandled-rejections=mode`
1526
1527<!-- YAML
1528added:
1529  - v12.0.0
1530  - v10.17.0
1531changes:
1532  - version: v15.0.0
1533    pr-url: https://github.com/nodejs/node/pull/33021
1534    description: Changed default mode to `throw`. Previously, a warning was
1535                 emitted.
1536-->
1537
1538Using this flag allows to change what should happen when an unhandled rejection
1539occurs. One of the following modes can be chosen:
1540
1541* `throw`: Emit [`unhandledRejection`][]. If this hook is not set, raise the
1542  unhandled rejection as an uncaught exception. This is the default.
1543* `strict`: Raise the unhandled rejection as an uncaught exception. If the
1544  exception is handled, [`unhandledRejection`][] is emitted.
1545* `warn`: Always trigger a warning, no matter if the [`unhandledRejection`][]
1546  hook is set or not but do not print the deprecation warning.
1547* `warn-with-error-code`: Emit [`unhandledRejection`][]. If this hook is not
1548  set, trigger a warning, and set the process exit code to 1.
1549* `none`: Silence all warnings.
1550
1551If a rejection happens during the command line entry point's ES module static
1552loading phase, it will always raise it as an uncaught exception.
1553
1554### `--use-bundled-ca`, `--use-openssl-ca`
1555
1556<!-- YAML
1557added: v6.11.0
1558-->
1559
1560Use bundled Mozilla CA store as supplied by current Node.js version
1561or use OpenSSL's default CA store. The default store is selectable
1562at build-time.
1563
1564The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store
1565that is fixed at release time. It is identical on all supported platforms.
1566
1567Using OpenSSL store allows for external modifications of the store. For most
1568Linux and BSD distributions, this store is maintained by the distribution
1569maintainers and system administrators. OpenSSL CA store location is dependent on
1570configuration of the OpenSSL library but this can be altered at runtime using
1571environment variables.
1572
1573See `SSL_CERT_DIR` and `SSL_CERT_FILE`.
1574
1575### `--use-largepages=mode`
1576
1577<!-- YAML
1578added:
1579 - v13.6.0
1580 - v12.17.0
1581-->
1582
1583Re-map the Node.js static code to large memory pages at startup. If supported on
1584the target system, this will cause the Node.js static code to be moved onto 2
1585MiB pages instead of 4 KiB pages.
1586
1587The following values are valid for `mode`:
1588
1589* `off`: No mapping will be attempted. This is the default.
1590* `on`: If supported by the OS, mapping will be attempted. Failure to map will
1591  be ignored and a message will be printed to standard error.
1592* `silent`: If supported by the OS, mapping will be attempted. Failure to map
1593  will be ignored and will not be reported.
1594
1595### `--v8-options`
1596
1597<!-- YAML
1598added: v0.1.3
1599-->
1600
1601Print V8 command-line options.
1602
1603### `--v8-pool-size=num`
1604
1605<!-- YAML
1606added: v5.10.0
1607-->
1608
1609Set V8's thread pool size which will be used to allocate background jobs.
1610
1611If set to `0` then Node.js will choose an appropriate size of the thread pool
1612based on an estimate of the amount of parallelism.
1613
1614The amount of parallelism refers to the number of computations that can be
1615carried out simultaneously in a given machine. In general, it's the same as the
1616amount of CPUs, but it may diverge in environments such as VMs or containers.
1617
1618### `--watch`
1619
1620<!-- YAML
1621added: v18.11.0
1622changes:
1623  - version: v18.13.0
1624    pr-url: https://github.com/nodejs/node/pull/45214
1625    description: Test runner now supports running in watch mode.
1626-->
1627
1628> Stability: 1 - Experimental
1629
1630Starts Node.js in watch mode.
1631When in watch mode, changes in the watched files cause the Node.js process to
1632restart.
1633By default, watch mode will watch the entry point
1634and any required or imported module.
1635Use `--watch-path` to specify what paths to watch.
1636
1637This flag cannot be combined with
1638`--check`, `--eval`, `--interactive`, or the REPL.
1639
1640```console
1641$ node --watch index.js
1642```
1643
1644### `--watch-path`
1645
1646<!-- YAML
1647added: v18.11.0
1648-->
1649
1650> Stability: 1 - Experimental
1651
1652Starts Node.js in watch mode and specifies what paths to watch.
1653When in watch mode, changes in the watched paths cause the Node.js process to
1654restart.
1655This will turn off watching of required or imported modules, even when used in
1656combination with `--watch`.
1657
1658This flag cannot be combined with
1659`--check`, `--eval`, `--interactive`, `--test`, or the REPL.
1660
1661```console
1662$ node --watch-path=./src --watch-path=./tests index.js
1663```
1664
1665This option is only supported on macOS and Windows.
1666An `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` exception will be thrown
1667when the option is used on a platform that does not support it.
1668
1669### `--watch-preserve-output`
1670
1671Disable the clearing of the console when watch mode restarts the process.
1672
1673```console
1674$ node --watch --watch-preserve-output test.js
1675```
1676
1677### `--zero-fill-buffers`
1678
1679<!-- YAML
1680added: v6.0.0
1681-->
1682
1683Automatically zero-fills all newly allocated [`Buffer`][] and [`SlowBuffer`][]
1684instances.
1685
1686### `-c`, `--check`
1687
1688<!-- YAML
1689added:
1690  - v5.0.0
1691  - v4.2.0
1692changes:
1693  - version: v10.0.0
1694    pr-url: https://github.com/nodejs/node/pull/19600
1695    description: The `--require` option is now supported when checking a file.
1696-->
1697
1698Syntax check the script without executing.
1699
1700### `-e`, `--eval "script"`
1701
1702<!-- YAML
1703added: v0.5.2
1704changes:
1705  - version: v5.11.0
1706    pr-url: https://github.com/nodejs/node/pull/5348
1707    description: Built-in libraries are now available as predefined variables.
1708-->
1709
1710Evaluate the following argument as JavaScript. The modules which are
1711predefined in the REPL can also be used in `script`.
1712
1713On Windows, using `cmd.exe` a single quote will not work correctly because it
1714only recognizes double `"` for quoting. In Powershell or Git bash, both `'`
1715and `"` are usable.
1716
1717### `-h`, `--help`
1718
1719<!-- YAML
1720added: v0.1.3
1721-->
1722
1723Print node command-line options.
1724The output of this option is less detailed than this document.
1725
1726### `-i`, `--interactive`
1727
1728<!-- YAML
1729added: v0.7.7
1730-->
1731
1732Opens the REPL even if stdin does not appear to be a terminal.
1733
1734### `-p`, `--print "script"`
1735
1736<!-- YAML
1737added: v0.6.4
1738changes:
1739  - version: v5.11.0
1740    pr-url: https://github.com/nodejs/node/pull/5348
1741    description: Built-in libraries are now available as predefined variables.
1742-->
1743
1744Identical to `-e` but prints the result.
1745
1746### `-r`, `--require module`
1747
1748<!-- YAML
1749added: v1.6.0
1750-->
1751
1752Preload the specified module at startup.
1753
1754Follows `require()`'s module resolution
1755rules. `module` may be either a path to a file, or a node module name.
1756
1757Only CommonJS modules are supported.
1758Use [`--import`][] to preload an [ECMAScript module][].
1759Modules preloaded with `--require` will run before modules preloaded with `--import`.
1760
1761### `-v`, `--version`
1762
1763<!-- YAML
1764added: v0.1.3
1765-->
1766
1767Print node's version.
1768
1769## Environment variables
1770
1771### `FORCE_COLOR=[1, 2, 3]`
1772
1773The `FORCE_COLOR` environment variable is used to
1774enable ANSI colorized output. The value may be:
1775
1776* `1`, `true`, or the empty string `''` indicate 16-color support,
1777* `2` to indicate 256-color support, or
1778* `3` to indicate 16 million-color support.
1779
1780When `FORCE_COLOR` is used and set to a supported value, both the `NO_COLOR`,
1781and `NODE_DISABLE_COLORS` environment variables are ignored.
1782
1783Any other value will result in colorized output being disabled.
1784
1785### `NODE_DEBUG=module[,…]`
1786
1787<!-- YAML
1788added: v0.1.32
1789-->
1790
1791`','`-separated list of core modules that should print debug information.
1792
1793### `NODE_DEBUG_NATIVE=module[,…]`
1794
1795`','`-separated list of core C++ modules that should print debug information.
1796
1797### `NODE_DISABLE_COLORS=1`
1798
1799<!-- YAML
1800added: v0.3.0
1801-->
1802
1803When set, colors will not be used in the REPL.
1804
1805### `NODE_EXTRA_CA_CERTS=file`
1806
1807<!-- YAML
1808added: v7.3.0
1809-->
1810
1811When set, the well known "root" CAs (like VeriSign) will be extended with the
1812extra certificates in `file`. The file should consist of one or more trusted
1813certificates in PEM format. A message will be emitted (once) with
1814[`process.emitWarning()`][emit_warning] if the file is missing or
1815malformed, but any errors are otherwise ignored.
1816
1817Neither the well known nor extra certificates are used when the `ca`
1818options property is explicitly specified for a TLS or HTTPS client or server.
1819
1820This environment variable is ignored when `node` runs as setuid root or
1821has Linux file capabilities set.
1822
1823The `NODE_EXTRA_CA_CERTS` environment variable is only read when the Node.js
1824process is first launched. Changing the value at runtime using
1825`process.env.NODE_EXTRA_CA_CERTS` has no effect on the current process.
1826
1827### `NODE_ICU_DATA=file`
1828
1829<!-- YAML
1830added: v0.11.15
1831-->
1832
1833Data path for ICU (`Intl` object) data. Will extend linked-in data when compiled
1834with small-icu support.
1835
1836### `NODE_NO_WARNINGS=1`
1837
1838<!-- YAML
1839added: v6.11.0
1840-->
1841
1842When set to `1`, process warnings are silenced.
1843
1844### `NODE_OPTIONS=options...`
1845
1846<!-- YAML
1847added: v8.0.0
1848-->
1849
1850A space-separated list of command-line options. `options...` are interpreted
1851before command-line options, so command-line options will override or
1852compound after anything in `options...`. Node.js will exit with an error if
1853an option that is not allowed in the environment is used, such as `-p` or a
1854script file.
1855
1856If an option value contains a space, it can be escaped using double quotes:
1857
1858```bash
1859NODE_OPTIONS='--require "./my path/file.js"'
1860```
1861
1862A singleton flag passed as a command-line option will override the same flag
1863passed into `NODE_OPTIONS`:
1864
1865```bash
1866# The inspector will be available on port 5555
1867NODE_OPTIONS='--inspect=localhost:4444' node --inspect=localhost:5555
1868```
1869
1870A flag that can be passed multiple times will be treated as if its
1871`NODE_OPTIONS` instances were passed first, and then its command-line
1872instances afterwards:
1873
1874```bash
1875NODE_OPTIONS='--require "./a.js"' node --require "./b.js"
1876# is equivalent to:
1877node --require "./a.js" --require "./b.js"
1878```
1879
1880Node.js options that are allowed are:
1881
1882<!-- node-options-node start -->
1883
1884* `--conditions`, `-C`
1885* `--diagnostic-dir`
1886* `--disable-proto`
1887* `--dns-result-order`
1888* `--enable-fips`
1889* `--enable-network-family-autoselection`
1890* `--enable-source-maps`
1891* `--experimental-abortcontroller`
1892* `--experimental-global-customevent`
1893* `--experimental-global-webcrypto`
1894* `--experimental-import-meta-resolve`
1895* `--experimental-json-modules`
1896* `--experimental-loader`
1897* `--experimental-modules`
1898* `--experimental-network-imports`
1899* `--experimental-policy`
1900* `--experimental-shadow-realm`
1901* `--experimental-specifier-resolution`
1902* `--experimental-top-level-await`
1903* `--experimental-vm-modules`
1904* `--experimental-wasi-unstable-preview1`
1905* `--experimental-wasm-modules`
1906* `--force-context-aware`
1907* `--force-fips`
1908* `--force-node-api-uncaught-exceptions-policy`
1909* `--frozen-intrinsics`
1910* `--heapsnapshot-near-heap-limit`
1911* `--heapsnapshot-signal`
1912* `--http-parser`
1913* `--icu-data-dir`
1914* `--import`
1915* `--input-type`
1916* `--insecure-http-parser`
1917* `--inspect-brk`
1918* `--inspect-port`, `--debug-port`
1919* `--inspect-publish-uid`
1920* `--inspect`
1921* `--max-http-header-size`
1922* `--napi-modules`
1923* `--no-addons`
1924* `--no-deprecation`
1925* `--no-experimental-fetch`
1926* `--no-experimental-repl-await`
1927* `--no-extra-info-on-fatal-exception`
1928* `--no-force-async-hooks-checks`
1929* `--no-global-search-paths`
1930* `--no-warnings`
1931* `--node-memory-debug`
1932* `--openssl-config`
1933* `--openssl-legacy-provider`
1934* `--openssl-shared-config`
1935* `--pending-deprecation`
1936* `--policy-integrity`
1937* `--preserve-symlinks-main`
1938* `--preserve-symlinks`
1939* `--prof-process`
1940* `--redirect-warnings`
1941* `--report-compact`
1942* `--report-dir`, `--report-directory`
1943* `--report-filename`
1944* `--report-on-fatalerror`
1945* `--report-on-signal`
1946* `--report-signal`
1947* `--report-uncaught-exception`
1948* `--require`, `-r`
1949* `--secure-heap-min`
1950* `--secure-heap`
1951* `--snapshot-blob`
1952* `--test-only`
1953* `--test-reporter-destination`
1954* `--test-reporter`
1955* `--throw-deprecation`
1956* `--title`
1957* `--tls-cipher-list`
1958* `--tls-keylog`
1959* `--tls-max-v1.2`
1960* `--tls-max-v1.3`
1961* `--tls-min-v1.0`
1962* `--tls-min-v1.1`
1963* `--tls-min-v1.2`
1964* `--tls-min-v1.3`
1965* `--trace-atomics-wait`
1966* `--trace-deprecation`
1967* `--trace-event-categories`
1968* `--trace-event-file-pattern`
1969* `--trace-events-enabled`
1970* `--trace-exit`
1971* `--trace-sigint`
1972* `--trace-sync-io`
1973* `--trace-tls`
1974* `--trace-uncaught`
1975* `--trace-warnings`
1976* `--track-heap-objects`
1977* `--unhandled-rejections`
1978* `--use-bundled-ca`
1979* `--use-largepages`
1980* `--use-openssl-ca`
1981* `--v8-pool-size`
1982* `--watch-path`
1983* `--watch-preserve-output`
1984* `--watch`
1985* `--zero-fill-buffers`
1986
1987<!-- node-options-node end -->
1988
1989V8 options that are allowed are:
1990
1991<!-- node-options-v8 start -->
1992
1993* `--abort-on-uncaught-exception`
1994* `--disallow-code-generation-from-strings`
1995* `--enable-etw-stack-walking`
1996* `--huge-max-old-generation-size`
1997* `--interpreted-frames-native-stack`
1998* `--jitless`
1999* `--max-old-space-size`
2000* `--max-semi-space-size`
2001* `--perf-basic-prof-only-functions`
2002* `--perf-basic-prof`
2003* `--perf-prof-unwinding-info`
2004* `--perf-prof`
2005* `--stack-trace-limit`
2006
2007<!-- node-options-v8 end -->
2008
2009`--perf-basic-prof-only-functions`, `--perf-basic-prof`,
2010`--perf-prof-unwinding-info`, and `--perf-prof` are only available on Linux.
2011
2012`--enable-etw-stack-walking` is only available on Windows.
2013
2014### `NODE_PATH=path[:…]`
2015
2016<!-- YAML
2017added: v0.1.32
2018-->
2019
2020`':'`-separated list of directories prefixed to the module search path.
2021
2022On Windows, this is a `';'`-separated list instead.
2023
2024### `NODE_PENDING_DEPRECATION=1`
2025
2026<!-- YAML
2027added: v8.0.0
2028-->
2029
2030When set to `1`, emit pending deprecation warnings.
2031
2032Pending deprecations are generally identical to a runtime deprecation with the
2033notable exception that they are turned _off_ by default and will not be emitted
2034unless either the `--pending-deprecation` command-line flag, or the
2035`NODE_PENDING_DEPRECATION=1` environment variable, is set. Pending deprecations
2036are used to provide a kind of selective "early warning" mechanism that
2037developers may leverage to detect deprecated API usage.
2038
2039### `NODE_PENDING_PIPE_INSTANCES=instances`
2040
2041Set the number of pending pipe instance handles when the pipe server is waiting
2042for connections. This setting applies to Windows only.
2043
2044### `NODE_PRESERVE_SYMLINKS=1`
2045
2046<!-- YAML
2047added: v7.1.0
2048-->
2049
2050When set to `1`, instructs the module loader to preserve symbolic links when
2051resolving and caching modules.
2052
2053### `NODE_REDIRECT_WARNINGS=file`
2054
2055<!-- YAML
2056added: v8.0.0
2057-->
2058
2059When set, process warnings will be emitted to the given file instead of
2060printing to stderr. The file will be created if it does not exist, and will be
2061appended to if it does. If an error occurs while attempting to write the
2062warning to the file, the warning will be written to stderr instead. This is
2063equivalent to using the `--redirect-warnings=file` command-line flag.
2064
2065### `NODE_REPL_HISTORY=file`
2066
2067<!-- YAML
2068added: v3.0.0
2069-->
2070
2071Path to the file used to store the persistent REPL history. The default path is
2072`~/.node_repl_history`, which is overridden by this variable. Setting the value
2073to an empty string (`''` or `' '`) disables persistent REPL history.
2074
2075### `NODE_REPL_EXTERNAL_MODULE=file`
2076
2077<!-- YAML
2078added:
2079 - v13.0.0
2080 - v12.16.0
2081-->
2082
2083Path to a Node.js module which will be loaded in place of the built-in REPL.
2084Overriding this value to an empty string (`''`) will use the built-in REPL.
2085
2086### `NODE_SKIP_PLATFORM_CHECK=value`
2087
2088<!-- YAML
2089added: v14.5.0
2090-->
2091
2092If `value` equals `'1'`, the check for a supported platform is skipped during
2093Node.js startup. Node.js might not execute correctly. Any issues encountered
2094on unsupported platforms will not be fixed.
2095
2096### `NODE_TEST_CONTEXT=value`
2097
2098If `value` equals `'child'`, test reporter options will be overridden and test
2099output will be sent to stdout in the TAP format. If any other value is provided,
2100Node.js makes no guarantees about the reporter format used or its stability.
2101
2102### `NODE_TLS_REJECT_UNAUTHORIZED=value`
2103
2104If `value` equals `'0'`, certificate validation is disabled for TLS connections.
2105This makes TLS, and HTTPS by extension, insecure. The use of this environment
2106variable is strongly discouraged.
2107
2108### `NODE_V8_COVERAGE=dir`
2109
2110When set, Node.js will begin outputting [V8 JavaScript code coverage][] and
2111[Source Map][] data to the directory provided as an argument (coverage
2112information is written as JSON to files with a `coverage` prefix).
2113
2114`NODE_V8_COVERAGE` will automatically propagate to subprocesses, making it
2115easier to instrument applications that call the `child_process.spawn()` family
2116of functions. `NODE_V8_COVERAGE` can be set to an empty string, to prevent
2117propagation.
2118
2119#### Coverage output
2120
2121Coverage is output as an array of [ScriptCoverage][] objects on the top-level
2122key `result`:
2123
2124```json
2125{
2126  "result": [
2127    {
2128      "scriptId": "67",
2129      "url": "internal/tty.js",
2130      "functions": []
2131    }
2132  ]
2133}
2134```
2135
2136#### Source map cache
2137
2138> Stability: 1 - Experimental
2139
2140If found, source map data is appended to the top-level key `source-map-cache`
2141on the JSON coverage object.
2142
2143`source-map-cache` is an object with keys representing the files source maps
2144were extracted from, and values which include the raw source-map URL
2145(in the key `url`), the parsed Source Map v3 information (in the key `data`),
2146and the line lengths of the source file (in the key `lineLengths`).
2147
2148```json
2149{
2150  "result": [
2151    {
2152      "scriptId": "68",
2153      "url": "file:///absolute/path/to/source.js",
2154      "functions": []
2155    }
2156  ],
2157  "source-map-cache": {
2158    "file:///absolute/path/to/source.js": {
2159      "url": "./path-to-map.json",
2160      "data": {
2161        "version": 3,
2162        "sources": [
2163          "file:///absolute/path/to/original.js"
2164        ],
2165        "names": [
2166          "Foo",
2167          "console",
2168          "info"
2169        ],
2170        "mappings": "MAAMA,IACJC,YAAaC",
2171        "sourceRoot": "./"
2172      },
2173      "lineLengths": [
2174        13,
2175        62,
2176        38,
2177        27
2178      ]
2179    }
2180  }
2181}
2182```
2183
2184### `NO_COLOR=<any>`
2185
2186[`NO_COLOR`][]  is an alias for `NODE_DISABLE_COLORS`. The value of the
2187environment variable is arbitrary.
2188
2189### `OPENSSL_CONF=file`
2190
2191<!-- YAML
2192added: v6.11.0
2193-->
2194
2195Load an OpenSSL configuration file on startup. Among other uses, this can be
2196used to enable FIPS-compliant crypto if Node.js is built with
2197`./configure --openssl-fips`.
2198
2199If the [`--openssl-config`][] command-line option is used, the environment
2200variable is ignored.
2201
2202### `SSL_CERT_DIR=dir`
2203
2204<!-- YAML
2205added: v7.7.0
2206-->
2207
2208If `--use-openssl-ca` is enabled, this overrides and sets OpenSSL's directory
2209containing trusted certificates.
2210
2211Be aware that unless the child environment is explicitly set, this environment
2212variable will be inherited by any child processes, and if they use OpenSSL, it
2213may cause them to trust the same CAs as node.
2214
2215### `SSL_CERT_FILE=file`
2216
2217<!-- YAML
2218added: v7.7.0
2219-->
2220
2221If `--use-openssl-ca` is enabled, this overrides and sets OpenSSL's file
2222containing trusted certificates.
2223
2224Be aware that unless the child environment is explicitly set, this environment
2225variable will be inherited by any child processes, and if they use OpenSSL, it
2226may cause them to trust the same CAs as node.
2227
2228### `TZ`
2229
2230<!-- YAML
2231added: v0.0.1
2232changes:
2233  - version:
2234     - v16.2.0
2235    pr-url: https://github.com/nodejs/node/pull/38642
2236    description:
2237      Changing the TZ variable using process.env.TZ = changes the timezone
2238      on Windows as well.
2239  - version:
2240     - v13.0.0
2241    pr-url: https://github.com/nodejs/node/pull/20026
2242    description:
2243      Changing the TZ variable using process.env.TZ = changes the timezone
2244      on POSIX systems.
2245-->
2246
2247The `TZ` environment variable is used to specify the timezone configuration.
2248
2249While Node.js does not support all of the various [ways that `TZ` is handled in
2250other environments][], it does support basic [timezone IDs][] (such as
2251`'Etc/UTC'`, `'Europe/Paris'`, or `'America/New_York'`).
2252It may support a few other abbreviations or aliases, but these are strongly
2253discouraged and not guaranteed.
2254
2255```console
2256$ TZ=Europe/Dublin node -pe "new Date().toString()"
2257Wed May 12 2021 20:30:48 GMT+0100 (Irish Standard Time)
2258```
2259
2260### `UV_THREADPOOL_SIZE=size`
2261
2262Set the number of threads used in libuv's threadpool to `size` threads.
2263
2264Asynchronous system APIs are used by Node.js whenever possible, but where they
2265do not exist, libuv's threadpool is used to create asynchronous node APIs based
2266on synchronous system APIs. Node.js APIs that use the threadpool are:
2267
2268* all `fs` APIs, other than the file watcher APIs and those that are explicitly
2269  synchronous
2270* asynchronous crypto APIs such as `crypto.pbkdf2()`, `crypto.scrypt()`,
2271  `crypto.randomBytes()`, `crypto.randomFill()`, `crypto.generateKeyPair()`
2272* `dns.lookup()`
2273* all `zlib` APIs, other than those that are explicitly synchronous
2274
2275Because libuv's threadpool has a fixed size, it means that if for whatever
2276reason any of these APIs takes a long time, other (seemingly unrelated) APIs
2277that run in libuv's threadpool will experience degraded performance. In order to
2278mitigate this issue, one potential solution is to increase the size of libuv's
2279threadpool by setting the `'UV_THREADPOOL_SIZE'` environment variable to a value
2280greater than `4` (its current default value). For more information, see the
2281[libuv threadpool documentation][].
2282
2283## Useful V8 options
2284
2285V8 has its own set of CLI options. Any V8 CLI option that is provided to `node`
2286will be passed on to V8 to handle. V8's options have _no stability guarantee_.
2287The V8 team themselves don't consider them to be part of their formal API,
2288and reserve the right to change them at any time. Likewise, they are not
2289covered by the Node.js stability guarantees. Many of the V8
2290options are of interest only to V8 developers. Despite this, there is a small
2291set of V8 options that are widely applicable to Node.js, and they are
2292documented here:
2293
2294### `--max-old-space-size=SIZE` (in megabytes)
2295
2296Sets the max memory size of V8's old memory section. As memory
2297consumption approaches the limit, V8 will spend more time on
2298garbage collection in an effort to free unused memory.
2299
2300On a machine with 2 GiB of memory, consider setting this to
23011536 (1.5 GiB) to leave some memory for other uses and avoid swapping.
2302
2303```console
2304$ node --max-old-space-size=1536 index.js
2305```
2306
2307### `--max-semi-space-size=SIZE` (in megabytes)
2308
2309Sets the maximum [semi-space][] size for V8's [scavenge garbage collector][] in
2310MiB (megabytes).
2311Increasing the max size of a semi-space may improve throughput for Node.js at
2312the cost of more memory consumption.
2313
2314Since the young generation size of the V8 heap is three times (see
2315[`YoungGenerationSizeFromSemiSpaceSize`][] in V8) the size of the semi-space,
2316an increase of 1 MiB to semi-space applies to each of the three individual
2317semi-spaces and causes the heap size to increase by 3 MiB. The throughput
2318improvement depends on your workload (see [#42511][]).
2319
2320The default value is 16 MiB for 64-bit systems and 8 MiB for 32-bit systems. To
2321get the best configuration for your application, you should try different
2322max-semi-space-size values when running benchmarks for your application.
2323
2324For example, benchmark on a 64-bit systems:
2325
2326```bash
2327for MiB in 16 32 64 128; do
2328    node --max-semi-space-size=$MiB index.js
2329done
2330```
2331
2332[#42511]: https://github.com/nodejs/node/issues/42511
2333[Chrome DevTools Protocol]: https://chromedevtools.github.io/devtools-protocol/
2334[CommonJS]: modules.md
2335[CommonJS module]: modules.md
2336[CustomEvent Web API]: https://dom.spec.whatwg.org/#customevent
2337[ECMAScript module]: esm.md#modules-ecmascript-modules
2338[ECMAScript module loader]: esm.md#loaders
2339[Fetch API]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
2340[Modules loaders]: packages.md#modules-loaders
2341[Node.js issue tracker]: https://github.com/nodejs/node/issues
2342[OSSL_PROVIDER-legacy]: https://www.openssl.org/docs/man3.0/man7/OSSL_PROVIDER-legacy.html
2343[REPL]: repl.md
2344[ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage
2345[ShadowRealm]: https://github.com/tc39/proposal-shadowrealm
2346[Source Map]: https://sourcemaps.info/spec.html
2347[Subresource Integrity]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
2348[V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html
2349[Web Crypto API]: webcrypto.md
2350[`"type"`]: packages.md#type
2351[`--cpu-prof-dir`]: #--cpu-prof-dir
2352[`--diagnostic-dir`]: #--diagnostic-dirdirectory
2353[`--experimental-wasm-modules`]: #--experimental-wasm-modules
2354[`--heap-prof-dir`]: #--heap-prof-dir
2355[`--import`]: #--importmodule
2356[`--openssl-config`]: #--openssl-configfile
2357[`--preserve-symlinks`]: #--preserve-symlinks
2358[`--redirect-warnings`]: #--redirect-warningsfile
2359[`--require`]: #-r---require-module
2360[`Atomics.wait()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/wait
2361[`Buffer`]: buffer.md#class-buffer
2362[`CRYPTO_secure_malloc_init`]: https://www.openssl.org/docs/man3.0/man3/CRYPTO_secure_malloc_init.html
2363[`NODE_OPTIONS`]: #node_optionsoptions
2364[`NO_COLOR`]: https://no-color.org
2365[`SlowBuffer`]: buffer.md#class-slowbuffer
2366[`YoungGenerationSizeFromSemiSpaceSize`]: https://chromium.googlesource.com/v8/v8.git/+/refs/tags/10.3.129/src/heap/heap.cc#328
2367[`dns.lookup()`]: dns.md#dnslookuphostname-options-callback
2368[`dns.setDefaultResultOrder()`]: dns.md#dnssetdefaultresultorderorder
2369[`dnsPromises.lookup()`]: dns.md#dnspromiseslookuphostname-options
2370[`import` specifier]: esm.md#import-specifiers
2371[`process.setUncaughtExceptionCaptureCallback()`]: process.md#processsetuncaughtexceptioncapturecallbackfn
2372[`tls.DEFAULT_MAX_VERSION`]: tls.md#tlsdefault_max_version
2373[`tls.DEFAULT_MIN_VERSION`]: tls.md#tlsdefault_min_version
2374[`unhandledRejection`]: process.md#event-unhandledrejection
2375[`v8.startupSnapshot` API]: v8.md#startup-snapshot-api
2376[`worker_threads.threadId`]: worker_threads.md#workerthreadid
2377[collecting code coverage from tests]: test.md#collecting-code-coverage
2378[conditional exports]: packages.md#conditional-exports
2379[context-aware]: addons.md#context-aware-addons
2380[customizing ESM specifier resolution]: esm.md#customizing-esm-specifier-resolution-algorithm
2381[debugger]: debugger.md
2382[debugging security implications]: https://nodejs.org/en/docs/guides/debugging-getting-started/#security-implications
2383[emit_warning]: process.md#processemitwarningwarning-options
2384[filtering tests by name]: test.md#filtering-tests-by-name
2385[jitless]: https://v8.dev/blog/jitless
2386[libuv threadpool documentation]: https://docs.libuv.org/en/latest/threadpool.html
2387[remote code execution]: https://www.owasp.org/index.php/Code_Injection
2388[running tests from the command line]: test.md#running-tests-from-the-command-line
2389[scavenge garbage collector]: https://v8.dev/blog/orinoco-parallel-scavenger
2390[security warning]: #warning-binding-inspector-to-a-public-ipport-combination-is-insecure
2391[semi-space]: https://www.memorymanagement.org/glossary/s.html#semi.space
2392[test reporters]: test.md#test-reporters
2393[timezone IDs]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
2394[tracking issue for user-land snapshots]: https://github.com/nodejs/node/issues/44014
2395[ways that `TZ` is handled in other environments]: https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html
2396