{ "type": "module", "source": "doc/api/cli.md", "introduced_in": "v5.9.1", "miscs": [ { "textRaw": "Command Line Options", "name": "Command Line Options", "introduced_in": "v5.9.1", "type": "misc", "desc": "

Node.js comes with a variety of CLI options. These options expose built-in\ndebugging, multiple ways to execute scripts, and other helpful runtime options.

\n

To view this documentation as a manual page in a terminal, run man node.

", "miscs": [ { "textRaw": "Synopsis", "name": "synopsis", "desc": "

node [options] [V8 options] [script.js | -e \"script\" | -] [--] [arguments]

\n

node inspect [script.js | -e \"script\" | <host>:<port>] …

\n

node --v8-options

\n

Execute without arguments to start the REPL.

\n

For more info about node inspect, please see the debugger documentation.

", "type": "misc", "displayName": "Synopsis" }, { "textRaw": "Options", "name": "options", "meta": { "changes": [ { "version": "v10.12.0", "pr-url": "https://github.com/nodejs/node/pull/23020", "description": "Underscores instead of dashes are now allowed for Node.js options as well, in addition to V8 options." } ] }, "desc": "

All options, including V8 options, allow words to be separated by both\ndashes (-) or underscores (_).

\n

For example, --pending-deprecation is equivalent to --pending_deprecation.

", "modules": [ { "textRaw": "`-`", "name": "`-`", "meta": { "added": [ "v8.0.0" ], "changes": [] }, "desc": "

Alias for stdin, analogous to the use of - in other command line utilities,\nmeaning that the script will be read from stdin, and the rest of the options\nare passed to that script.

", "type": "module", "displayName": "`-`" }, { "textRaw": "`--`", "name": "`--`", "meta": { "added": [ "v6.11.0" ], "changes": [] }, "desc": "

Indicate the end of node options. Pass the rest of the arguments to the script.\nIf no script filename or eval/print script is supplied prior to this, then\nthe next argument will be used as a script filename.

", "type": "module", "displayName": "`--`" }, { "textRaw": "`--abort-on-uncaught-exception`", "name": "`--abort-on-uncaught-exception`", "meta": { "added": [ "v0.10" ], "changes": [] }, "desc": "

Aborting instead of exiting causes a core file to be generated for post-mortem\nanalysis using a debugger (such as lldb, gdb, and mdb).

\n

If this flag is passed, the behavior can still be set to not abort through\nprocess.setUncaughtExceptionCaptureCallback() (and through usage of the\ndomain module that uses it).

", "type": "module", "displayName": "`--abort-on-uncaught-exception`" }, { "textRaw": "`--completion-bash`", "name": "`--completion-bash`", "meta": { "added": [ "v10.12.0" ], "changes": [] }, "desc": "

Print source-able bash completion script for Node.js.

\n
$ node --completion-bash > node_bash_completion\n$ source node_bash_completion\n
", "type": "module", "displayName": "`--completion-bash`" }, { "textRaw": "`--enable-fips`", "name": "`--enable-fips`", "meta": { "added": [ "v6.0.0" ], "changes": [] }, "desc": "

Enable FIPS-compliant crypto at startup. (Requires Node.js to be built with\n./configure --openssl-fips.)

", "type": "module", "displayName": "`--enable-fips`" }, { "textRaw": "`--experimental-modules`", "name": "`--experimental-modules`", "meta": { "added": [ "v8.5.0" ], "changes": [] }, "desc": "

Enable experimental ES module support and caching modules.

", "type": "module", "displayName": "`--experimental-modules`" }, { "textRaw": "`--experimental-repl-await`", "name": "`--experimental-repl-await`", "meta": { "added": [ "v10.0.0" ], "changes": [] }, "desc": "

Enable experimental top-level await keyword support in REPL.

", "type": "module", "displayName": "`--experimental-repl-await`" }, { "textRaw": "`--experimental-vm-modules`", "name": "`--experimental-vm-modules`", "meta": { "added": [ "v9.6.0" ], "changes": [] }, "desc": "

Enable experimental ES Module support in the vm module.

", "type": "module", "displayName": "`--experimental-vm-modules`" }, { "textRaw": "`--experimental-worker`", "name": "`--experimental-worker`", "meta": { "added": [ "v10.5.0" ], "changes": [] }, "desc": "

Enable experimental worker threads using the worker_threads module.

", "type": "module", "displayName": "`--experimental-worker`" }, { "textRaw": "`--force-fips`", "name": "`--force-fips`", "meta": { "added": [ "v6.0.0" ], "changes": [] }, "desc": "

Force FIPS-compliant crypto on startup. (Cannot be disabled from script code.)\n(Same requirements as --enable-fips.)

", "type": "module", "displayName": "`--force-fips`" }, { "textRaw": "`--icu-data-dir=file`", "name": "`--icu-data-dir=file`", "meta": { "added": [ "v0.11.15" ], "changes": [] }, "desc": "

Specify ICU data load path. (Overrides NODE_ICU_DATA.)

", "type": "module", "displayName": "`--icu-data-dir=file`" }, { "textRaw": "`--inspect-brk[=[host:]port]`", "name": "`--inspect-brk[=[host:]port]`", "meta": { "added": [ "v7.6.0" ], "changes": [] }, "desc": "

Activate inspector on host:port and break at start of user script.\nDefault host:port is 127.0.0.1:9229.

", "type": "module", "displayName": "`--inspect-brk[=[host:]port]`" }, { "textRaw": "`--inspect-port=[host:]port`", "name": "`--inspect-port=[host:]port`", "meta": { "added": [ "v7.6.0" ], "changes": [] }, "desc": "

Set the host:port to be used when the inspector is activated.\nUseful when activating the inspector by sending the SIGUSR1 signal.

\n

Default host is 127.0.0.1.

\n

See the security warning below regarding the host\nparameter usage.

", "type": "module", "displayName": "`--inspect-port=[host:]port`" }, { "textRaw": "`--inspect[=[host:]port]`", "name": "`--inspect[=[host:]port]`", "meta": { "added": [ "v6.3.0" ], "changes": [] }, "desc": "

Activate inspector on host:port. Default is 127.0.0.1:9229.

\n

V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug\nand profile Node.js instances. The tools attach to Node.js instances via a\ntcp port and communicate using the Chrome DevTools Protocol.

\n

", "modules": [ { "textRaw": "Warning: binding inspector to a public IP:port combination is insecure", "name": "warning:_binding_inspector_to_a_public_ip:port_combination_is_insecure", "desc": "

Binding the inspector to a public IP (including 0.0.0.0) with an open port is\ninsecure, as it allows external hosts to connect to the inspector and perform\na remote code execution attack.

\n

If you specify a host, make sure that at least one of the following is true:\neither the host is not public, or the port is properly firewalled to disallow\nunwanted connections.

\n

More specifically, --inspect=0.0.0.0 is insecure if the port (9229 by\ndefault) is not firewall-protected.

\n

See the debugging security implications section for more information.

", "type": "module", "displayName": "Warning: binding inspector to a public IP:port combination is insecure" } ], "type": "module", "displayName": "`--inspect[=[host:]port]`" }, { "textRaw": "`--loader=file`", "name": "`--loader=file`", "meta": { "added": [ "v9.0.0" ], "changes": [] }, "desc": "

Specify the file of the custom experimental ECMAScript Module loader.

", "type": "module", "displayName": "`--loader=file`" }, { "textRaw": "`--insecure-http-parser`", "name": "`--insecure-http-parser`", "meta": { "added": [ "v10.19.0" ], "changes": [] }, "desc": "

Use an insecure HTTP parser that accepts invalid HTTP headers. This may allow\ninteroperability with non-conformant HTTP implementations. It may also allow\nrequest smuggling and other HTTP attacks that rely on invalid headers being\naccepted. Avoid using this option.

", "type": "module", "displayName": "`--insecure-http-parser`" }, { "textRaw": "`--max-http-header-size=size`", "name": "`--max-http-header-size=size`", "meta": { "added": [ "v10.15.0" ], "changes": [] }, "desc": "

Specify the maximum size, in bytes, of HTTP headers. Defaults to 8KB.

", "type": "module", "displayName": "`--max-http-header-size=size`" }, { "textRaw": "`--napi-modules`", "name": "`--napi-modules`", "meta": { "added": [ "v7.10.0" ], "changes": [] }, "desc": "

This option is a no-op. It is kept for compatibility.

", "type": "module", "displayName": "`--napi-modules`" }, { "textRaw": "`--no-deprecation`", "name": "`--no-deprecation`", "meta": { "added": [ "v0.8.0" ], "changes": [] }, "desc": "

Silence deprecation warnings.

", "type": "module", "displayName": "`--no-deprecation`" }, { "textRaw": "`--no-force-async-hooks-checks`", "name": "`--no-force-async-hooks-checks`", "meta": { "added": [ "v9.0.0" ], "changes": [] }, "desc": "

Disables runtime checks for async_hooks. These will still be enabled\ndynamically when async_hooks is enabled.

", "type": "module", "displayName": "`--no-force-async-hooks-checks`" }, { "textRaw": "`--no-warnings`", "name": "`--no-warnings`", "meta": { "added": [ "v6.0.0" ], "changes": [] }, "desc": "

Silence all process warnings (including deprecations).

", "type": "module", "displayName": "`--no-warnings`" }, { "textRaw": "`--openssl-config=file`", "name": "`--openssl-config=file`", "meta": { "added": [ "v6.9.0" ], "changes": [] }, "desc": "

Load an OpenSSL configuration file on startup. Among other uses, this can be\nused to enable FIPS-compliant crypto if Node.js is built with\n./configure --openssl-fips.

", "type": "module", "displayName": "`--openssl-config=file`" }, { "textRaw": "`--pending-deprecation`", "name": "`--pending-deprecation`", "meta": { "added": [ "v8.0.0" ], "changes": [] }, "desc": "

Emit pending deprecation warnings.

\n

Pending deprecations are generally identical to a runtime deprecation with the\nnotable exception that they are turned off by default and will not be emitted\nunless either the --pending-deprecation command line flag, or the\nNODE_PENDING_DEPRECATION=1 environment variable, is set. Pending deprecations\nare used to provide a kind of selective \"early warning\" mechanism that\ndevelopers may leverage to detect deprecated API usage.

", "type": "module", "displayName": "`--pending-deprecation`" }, { "textRaw": "`--preserve-symlinks`", "name": "`--preserve-symlinks`", "meta": { "added": [ "v6.3.0" ], "changes": [] }, "desc": "

Instructs the module loader to preserve symbolic links when resolving and\ncaching modules.

\n

By default, when Node.js loads a module from a path that is symbolically linked\nto a different on-disk location, Node.js will dereference the link and use the\nactual on-disk \"real path\" of the module as both an identifier and as a root\npath to locate other dependency modules. In most cases, this default behavior\nis acceptable. However, when using symbolically linked peer dependencies, as\nillustrated in the example below, the default behavior causes an exception to\nbe thrown if moduleA attempts to require moduleB as a peer dependency:

\n
{appDir}\n ├── app\n │   ├── index.js\n │   └── node_modules\n │       ├── moduleA -> {appDir}/moduleA\n │       └── moduleB\n │           ├── index.js\n │           └── package.json\n └── moduleA\n     ├── index.js\n     └── package.json\n
\n

The --preserve-symlinks command line flag instructs Node.js to use the\nsymlink path for modules as opposed to the real path, allowing symbolically\nlinked peer dependencies to be found.

\n

Note, however, that using --preserve-symlinks can have other side effects.\nSpecifically, symbolically linked native modules can fail to load if those\nare linked from more than one location in the dependency tree (Node.js would\nsee those as two separate modules and would attempt to load the module multiple\ntimes, causing an exception to be thrown).

\n

The --preserve-symlinks flag does not apply to the main module, which allows\nnode --preserve-symlinks node_module/.bin/<foo> to work. To apply the same\nbehavior for the main module, also use --preserve-symlinks-main.

", "type": "module", "displayName": "`--preserve-symlinks`" }, { "textRaw": "`--preserve-symlinks-main`", "name": "`--preserve-symlinks-main`", "meta": { "added": [ "v10.2.0" ], "changes": [] }, "desc": "

Instructs the module loader to preserve symbolic links when resolving and\ncaching the main module (require.main).

\n

This flag exists so that the main module can be opted-in to the same behavior\nthat --preserve-symlinks gives to all other imports; they are separate flags,\nhowever, for backward compatibility with older Node.js versions.

\n

Note that --preserve-symlinks-main does not imply --preserve-symlinks; it\nis expected that --preserve-symlinks-main will be used in addition to\n--preserve-symlinks when it is not desirable to follow symlinks before\nresolving relative paths.

\n

See --preserve-symlinks for more information.

", "type": "module", "displayName": "`--preserve-symlinks-main`" }, { "textRaw": "`--prof`", "name": "`--prof`", "meta": { "added": [ "v2.0.0" ], "changes": [] }, "desc": "

Generate V8 profiler output.

", "type": "module", "displayName": "`--prof`" }, { "textRaw": "`--prof-process`", "name": "`--prof-process`", "meta": { "added": [ "v5.2.0" ], "changes": [] }, "desc": "

Process V8 profiler output generated using the V8 option --prof.

", "type": "module", "displayName": "`--prof-process`" }, { "textRaw": "`--redirect-warnings=file`", "name": "`--redirect-warnings=file`", "meta": { "added": [ "v8.0.0" ], "changes": [] }, "desc": "

Write process warnings to the given file instead of printing to stderr. The\nfile will be created if it does not exist, and will be appended to if it does.\nIf an error occurs while attempting to write the warning to the file, the\nwarning will be written to stderr instead.

", "type": "module", "displayName": "`--redirect-warnings=file`" }, { "textRaw": "`--throw-deprecation`", "name": "`--throw-deprecation`", "meta": { "added": [ "v0.11.14" ], "changes": [] }, "desc": "

Throw errors for deprecations.

", "type": "module", "displayName": "`--throw-deprecation`" }, { "textRaw": "`--title=title`", "name": "`--title=title`", "meta": { "added": [ "v10.7.0" ], "changes": [] }, "desc": "

Set process.title on startup.

", "type": "module", "displayName": "`--title=title`" }, { "textRaw": "`--tls-cipher-list=list`", "name": "`--tls-cipher-list=list`", "meta": { "added": [ "v4.0.0" ], "changes": [] }, "desc": "

Specify an alternative default TLS cipher list. Requires Node.js to be built\nwith crypto support (default).

", "type": "module", "displayName": "`--tls-cipher-list=list`" }, { "textRaw": "`--tls-max-v1.2`", "name": "`--tls-max-v1.2`", "meta": { "added": [ "v10.20.0" ], "changes": [] }, "desc": "

Does nothing, [tls.DEFAULT_MAX_VERSION][] is always 'TLSv1.2'. Exists for\ncompatibility with Node.js 11.x and higher.

", "type": "module", "displayName": "`--tls-max-v1.2`" }, { "textRaw": "`--tls-min-v1.0`", "name": "`--tls-min-v1.0`", "meta": { "added": [ "v10.20.0" ], "changes": [] }, "desc": "

Set default [tls.DEFAULT_MIN_VERSION][] to 'TLSv1'. Use for compatibility with\nold TLS clients or servers.

", "type": "module", "displayName": "`--tls-min-v1.0`" }, { "textRaw": "`--tls-min-v1.1`", "name": "`--tls-min-v1.1`", "meta": { "added": [ "v10.20.0" ], "changes": [] }, "desc": "

Set default [tls.DEFAULT_MIN_VERSION][] to 'TLSv1.1'. Use for compatibility\nwith old TLS clients or servers.

", "type": "module", "displayName": "`--tls-min-v1.1`" }, { "textRaw": "`--tls-min-v1.2`", "name": "`--tls-min-v1.2`", "meta": { "added": [ "v10.20.0" ], "changes": [] }, "desc": "

Set default [tls.DEFAULT_MIN_VERSION][] to 'TLSv1.2'. Use this to disable\nsupport for earlier TLS versions, which are less secure.

", "type": "module", "displayName": "`--tls-min-v1.2`" }, { "textRaw": "`--trace-deprecation`", "name": "`--trace-deprecation`", "meta": { "added": [ "v0.8.0" ], "changes": [] }, "desc": "

Print stack traces for deprecations.

", "type": "module", "displayName": "`--trace-deprecation`" }, { "textRaw": "`--trace-event-categories`", "name": "`--trace-event-categories`", "meta": { "added": [ "v7.7.0" ], "changes": [] }, "desc": "

A comma separated list of categories that should be traced when trace event\ntracing is enabled using --trace-events-enabled.

", "type": "module", "displayName": "`--trace-event-categories`" }, { "textRaw": "`--trace-event-file-pattern`", "name": "`--trace-event-file-pattern`", "meta": { "added": [ "v9.8.0" ], "changes": [] }, "desc": "

Template string specifying the filepath for the trace event data, it\nsupports ${rotation} and ${pid}.

", "type": "module", "displayName": "`--trace-event-file-pattern`" }, { "textRaw": "`--trace-events-enabled`", "name": "`--trace-events-enabled`", "meta": { "added": [ "v7.7.0" ], "changes": [] }, "desc": "

Enables the collection of trace event tracing information.

", "type": "module", "displayName": "`--trace-events-enabled`" }, { "textRaw": "`--trace-sync-io`", "name": "`--trace-sync-io`", "meta": { "added": [ "v2.1.0" ], "changes": [] }, "desc": "

Prints a stack trace whenever synchronous I/O is detected after the first turn\nof the event loop.

", "type": "module", "displayName": "`--trace-sync-io`" }, { "textRaw": "`--trace-warnings`", "name": "`--trace-warnings`", "meta": { "added": [ "v6.0.0" ], "changes": [] }, "desc": "

Print stack traces for process warnings (including deprecations).

", "type": "module", "displayName": "`--trace-warnings`" }, { "textRaw": "`--track-heap-objects`", "name": "`--track-heap-objects`", "meta": { "added": [ "v2.4.0" ], "changes": [] }, "desc": "

Track heap object allocations for heap snapshots.

", "type": "module", "displayName": "`--track-heap-objects`" }, { "textRaw": "`--unhandled-rejections=mode`", "name": "`--unhandled-rejections=mode`", "meta": { "added": [ "v10.17.0" ], "changes": [] }, "desc": "

By default all unhandled rejections trigger a warning plus a deprecation warning\nfor the very first unhandled rejection in case no unhandledRejection hook\nis used.

\n

Using this flag allows to change what should happen when an unhandled rejection\noccurs. One of three modes can be chosen:

\n", "type": "module", "displayName": "`--unhandled-rejections=mode`" }, { "textRaw": "`--use-bundled-ca`, `--use-openssl-ca`", "name": "`--use-bundled-ca`,_`--use-openssl-ca`", "meta": { "added": [ "v6.11.0" ], "changes": [] }, "desc": "

Use bundled Mozilla CA store as supplied by current Node.js version\nor use OpenSSL's default CA store. The default store is selectable\nat build-time.

\n

The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store\nthat is fixed at release time. It is identical on all supported platforms.

\n

Using OpenSSL store allows for external modifications of the store. For most\nLinux and BSD distributions, this store is maintained by the distribution\nmaintainers and system administrators. OpenSSL CA store location is dependent on\nconfiguration of the OpenSSL library but this can be altered at runtime using\nenvironment variables.

\n

See SSL_CERT_DIR and SSL_CERT_FILE.

", "type": "module", "displayName": "`--use-bundled-ca`, `--use-openssl-ca`" }, { "textRaw": "`--v8-options`", "name": "`--v8-options`", "meta": { "added": [ "v0.1.3" ], "changes": [] }, "desc": "

Print V8 command line options.

", "type": "module", "displayName": "`--v8-options`" }, { "textRaw": "`--v8-pool-size=num`", "name": "`--v8-pool-size=num`", "meta": { "added": [ "v5.10.0" ], "changes": [] }, "desc": "

Set V8's thread pool size which will be used to allocate background jobs.

\n

If set to 0 then V8 will choose an appropriate size of the thread pool based\non the number of online processors.

\n

If the value provided is larger than V8's maximum, then the largest value\nwill be chosen.

", "type": "module", "displayName": "`--v8-pool-size=num`" }, { "textRaw": "`--zero-fill-buffers`", "name": "`--zero-fill-buffers`", "meta": { "added": [ "v6.0.0" ], "changes": [] }, "desc": "

Automatically zero-fills all newly allocated Buffer and SlowBuffer\ninstances.

", "type": "module", "displayName": "`--zero-fill-buffers`" }, { "textRaw": "`-c`, `--check`", "name": "`-c`,_`--check`", "meta": { "added": [ "v5.0.0", "v4.2.0" ], "changes": [ { "version": "v10.0.0", "pr-url": "https://github.com/nodejs/node/pull/19600", "description": "The `--require` option is now supported when checking a file." } ] }, "desc": "

Syntax check the script without executing.

", "type": "module", "displayName": "`-c`, `--check`" }, { "textRaw": "`-e`, `--eval \"script\"`", "name": "`-e`,_`--eval_\"script\"`", "meta": { "added": [ "v0.5.2" ], "changes": [ { "version": "v5.11.0", "pr-url": "https://github.com/nodejs/node/pull/5348", "description": "Built-in libraries are now available as predefined variables." } ] }, "desc": "

Evaluate the following argument as JavaScript. The modules which are\npredefined in the REPL can also be used in script.

\n

On Windows, using cmd.exe a single quote will not work correctly because it\nonly recognizes double \" for quoting. In Powershell or Git bash, both '\nand \" are usable.

", "type": "module", "displayName": "`-e`, `--eval \"script\"`" }, { "textRaw": "`-h`, `--help`", "name": "`-h`,_`--help`", "meta": { "added": [ "v0.1.3" ], "changes": [] }, "desc": "

Print node command line options.\nThe output of this option is less detailed than this document.

", "type": "module", "displayName": "`-h`, `--help`" }, { "textRaw": "`-i`, `--interactive`", "name": "`-i`,_`--interactive`", "meta": { "added": [ "v0.7.7" ], "changes": [] }, "desc": "

Opens the REPL even if stdin does not appear to be a terminal.

", "type": "module", "displayName": "`-i`, `--interactive`" }, { "textRaw": "`-p`, `--print \"script\"`", "name": "`-p`,_`--print_\"script\"`", "meta": { "added": [ "v0.6.4" ], "changes": [ { "version": "v5.11.0", "pr-url": "https://github.com/nodejs/node/pull/5348", "description": "Built-in libraries are now available as predefined variables." } ] }, "desc": "

Identical to -e but prints the result.

", "type": "module", "displayName": "`-p`, `--print \"script\"`" }, { "textRaw": "`-r`, `--require module`", "name": "`-r`,_`--require_module`", "meta": { "added": [ "v1.6.0" ], "changes": [] }, "desc": "

Preload the specified module at startup.

\n

Follows require()'s module resolution\nrules. module may be either a path to a file, or a node module name.

", "type": "module", "displayName": "`-r`, `--require module`" }, { "textRaw": "`-v`, `--version`", "name": "`-v`,_`--version`", "meta": { "added": [ "v0.1.3" ], "changes": [] }, "desc": "

Print node's version.

", "type": "module", "displayName": "`-v`, `--version`" } ], "type": "misc", "displayName": "Options" }, { "textRaw": "Environment Variables", "name": "environment_variables", "modules": [ { "textRaw": "`NODE_DEBUG=module[,…]`", "name": "`node_debug=module[,…]`", "meta": { "added": [ "v0.1.32" ], "changes": [] }, "desc": "

','-separated list of core modules that should print debug information.

", "type": "module", "displayName": "`NODE_DEBUG=module[,…]`" }, { "textRaw": "`NODE_DEBUG_NATIVE=module[,…]`", "name": "`node_debug_native=module[,…]`", "desc": "

','-separated list of core C++ modules that should print debug information.

", "type": "module", "displayName": "`NODE_DEBUG_NATIVE=module[,…]`" }, { "textRaw": "`NODE_DISABLE_COLORS=1`", "name": "`node_disable_colors=1`", "meta": { "added": [ "v0.3.0" ], "changes": [] }, "desc": "

When set to 1 colors will not be used in the REPL.

", "type": "module", "displayName": "`NODE_DISABLE_COLORS=1`" }, { "textRaw": "`NODE_EXTRA_CA_CERTS=file`", "name": "`node_extra_ca_certs=file`", "meta": { "added": [ "v7.3.0" ], "changes": [] }, "desc": "

When set, the well known \"root\" CAs (like VeriSign) will be extended with the\nextra certificates in file. The file should consist of one or more trusted\ncertificates in PEM format. A message will be emitted (once) with\nprocess.emitWarning() if the file is missing or\nmalformed, but any errors are otherwise ignored.

\n

Note that neither the well known nor extra certificates are used when the ca\noptions property is explicitly specified for a TLS or HTTPS client or server.

\n

This environment variable is ignored when node runs as setuid root or\nhas Linux file capabilities set.

", "type": "module", "displayName": "`NODE_EXTRA_CA_CERTS=file`" }, { "textRaw": "`NODE_ICU_DATA=file`", "name": "`node_icu_data=file`", "meta": { "added": [ "v0.11.15" ], "changes": [] }, "desc": "

Data path for ICU (Intl object) data. Will extend linked-in data when compiled\nwith small-icu support.

", "type": "module", "displayName": "`NODE_ICU_DATA=file`" }, { "textRaw": "`NODE_NO_WARNINGS=1`", "name": "`node_no_warnings=1`", "meta": { "added": [ "v6.11.0" ], "changes": [] }, "desc": "

When set to 1, process warnings are silenced.

", "type": "module", "displayName": "`NODE_NO_WARNINGS=1`" }, { "textRaw": "`NODE_OPTIONS=options...`", "name": "`node_options=options...`", "meta": { "added": [ "v8.0.0" ], "changes": [] }, "desc": "

A space-separated list of command line options. options... are interpreted as\nif they had been specified on the command line before the actual command line\n(so they can be overridden). Node.js will exit with an error if an option\nthat is not allowed in the environment is used, such as -p or a script file.

\n

In case an option value happens to contain a space (for example a path listed in\n--require), it must be escaped using double quotes. For example:

\n
--require \"./my path/file.js\"\n
\n

Node.js options that are allowed are:

\n\n

V8 options that are allowed are:

\n", "type": "module", "displayName": "`NODE_OPTIONS=options...`" }, { "textRaw": "`NODE_PATH=path[:…]`", "name": "`node_path=path[:…]`", "meta": { "added": [ "v0.1.32" ], "changes": [] }, "desc": "

':'-separated list of directories prefixed to the module search path.

\n

On Windows, this is a ';'-separated list instead.

", "type": "module", "displayName": "`NODE_PATH=path[:…]`" }, { "textRaw": "`NODE_PENDING_DEPRECATION=1`", "name": "`node_pending_deprecation=1`", "meta": { "added": [ "v8.0.0" ], "changes": [] }, "desc": "

When set to 1, emit pending deprecation warnings.

\n

Pending deprecations are generally identical to a runtime deprecation with the\nnotable exception that they are turned off by default and will not be emitted\nunless either the --pending-deprecation command line flag, or the\nNODE_PENDING_DEPRECATION=1 environment variable, is set. Pending deprecations\nare used to provide a kind of selective \"early warning\" mechanism that\ndevelopers may leverage to detect deprecated API usage.

", "type": "module", "displayName": "`NODE_PENDING_DEPRECATION=1`" }, { "textRaw": "`NODE_PRESERVE_SYMLINKS=1`", "name": "`node_preserve_symlinks=1`", "meta": { "added": [ "v7.1.0" ], "changes": [] }, "desc": "

When set to 1, instructs the module loader to preserve symbolic links when\nresolving and caching modules.

", "type": "module", "displayName": "`NODE_PRESERVE_SYMLINKS=1`" }, { "textRaw": "`NODE_REDIRECT_WARNINGS=file`", "name": "`node_redirect_warnings=file`", "meta": { "added": [ "v8.0.0" ], "changes": [] }, "desc": "

When set, process warnings will be emitted to the given file instead of\nprinting to stderr. The file will be created if it does not exist, and will be\nappended to if it does. If an error occurs while attempting to write the\nwarning to the file, the warning will be written to stderr instead. This is\nequivalent to using the --redirect-warnings=file command-line flag.

", "type": "module", "displayName": "`NODE_REDIRECT_WARNINGS=file`" }, { "textRaw": "`NODE_REPL_HISTORY=file`", "name": "`node_repl_history=file`", "meta": { "added": [ "v3.0.0" ], "changes": [] }, "desc": "

Path to the file used to store the persistent REPL history. The default path is\n~/.node_repl_history, which is overridden by this variable. Setting the value\nto an empty string ('' or ' ') disables persistent REPL history.

", "type": "module", "displayName": "`NODE_REPL_HISTORY=file`" }, { "textRaw": "`NODE_TLS_REJECT_UNAUTHORIZED=value`", "name": "`node_tls_reject_unauthorized=value`", "desc": "

If value equals '0', certificate validation is disabled for TLS connections.\nThis makes TLS, and HTTPS by extension, insecure. The use of this environment\nvariable is strongly discouraged.

", "type": "module", "displayName": "`NODE_TLS_REJECT_UNAUTHORIZED=value`" }, { "textRaw": "`NODE_V8_COVERAGE=dir`", "name": "`node_v8_coverage=dir`", "desc": "

When set, Node.js will begin outputting V8 JavaScript code coverage to the\ndirectory provided as an argument. Coverage is output as an array of\nScriptCoverage objects:

\n
{\n  \"result\": [\n    {\n      \"scriptId\": \"67\",\n      \"url\": \"internal/tty.js\",\n      \"functions\": []\n    }\n  ]\n}\n
\n

NODE_V8_COVERAGE will automatically propagate to subprocesses, making it\neasier to instrument applications that call the child_process.spawn() family\nof functions. NODE_V8_COVERAGE can be set to an empty string, to prevent\npropagation.

\n

At this time coverage is only collected in the main thread and will not be\noutput for code executed by worker threads.

", "type": "module", "displayName": "`NODE_V8_COVERAGE=dir`" }, { "textRaw": "`OPENSSL_CONF=file`", "name": "`openssl_conf=file`", "meta": { "added": [ "v6.11.0" ], "changes": [] }, "desc": "

Load an OpenSSL configuration file on startup. Among other uses, this can be\nused to enable FIPS-compliant crypto if Node.js is built with ./configure --openssl-fips.

\n

If the --openssl-config command line option is used, the environment\nvariable is ignored.

", "type": "module", "displayName": "`OPENSSL_CONF=file`" }, { "textRaw": "`SSL_CERT_DIR=dir`", "name": "`ssl_cert_dir=dir`", "meta": { "added": [ "v7.7.0" ], "changes": [] }, "desc": "

If --use-openssl-ca is enabled, this overrides and sets OpenSSL's directory\ncontaining trusted certificates.

\n

Be aware that unless the child environment is explicitly set, this environment\nvariable will be inherited by any child processes, and if they use OpenSSL, it\nmay cause them to trust the same CAs as node.

", "type": "module", "displayName": "`SSL_CERT_DIR=dir`" }, { "textRaw": "`SSL_CERT_FILE=file`", "name": "`ssl_cert_file=file`", "meta": { "added": [ "v7.7.0" ], "changes": [] }, "desc": "

If --use-openssl-ca is enabled, this overrides and sets OpenSSL's file\ncontaining trusted certificates.

\n

Be aware that unless the child environment is explicitly set, this environment\nvariable will be inherited by any child processes, and if they use OpenSSL, it\nmay cause them to trust the same CAs as node.

", "type": "module", "displayName": "`SSL_CERT_FILE=file`" }, { "textRaw": "`UV_THREADPOOL_SIZE=size`", "name": "`uv_threadpool_size=size`", "desc": "

Set the number of threads used in libuv's threadpool to size threads.

\n

Asynchronous system APIs are used by Node.js whenever possible, but where they\ndo not exist, libuv's threadpool is used to create asynchronous node APIs based\non synchronous system APIs. Node.js APIs that use the threadpool are:

\n\n

Because libuv's threadpool has a fixed size, it means that if for whatever\nreason any of these APIs takes a long time, other (seemingly unrelated) APIs\nthat run in libuv's threadpool will experience degraded performance. In order to\nmitigate this issue, one potential solution is to increase the size of libuv's\nthreadpool by setting the 'UV_THREADPOOL_SIZE' environment variable to a value\ngreater than 4 (its current default value). For more information, see the\nlibuv threadpool documentation.

", "type": "module", "displayName": "`UV_THREADPOOL_SIZE=size`" } ], "type": "misc", "displayName": "Environment Variables" } ] } ] }