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