2018-02-03 13:16:50 +00:00
|
|
|
.\"
|
|
|
|
.\" This manpage is written in mdoc(7).
|
|
|
|
.\"
|
|
|
|
.\" * Language reference:
|
|
|
|
.\" https://man.openbsd.org/mdoc.7
|
|
|
|
.\"
|
|
|
|
.\" * Linting changes:
|
|
|
|
.\" mandoc -Wall -Tlint /path/to/this.file # BSD
|
|
|
|
.\" groff -w all -z /path/to/this.file # GNU/Linux, macOS
|
|
|
|
.\"
|
|
|
|
.\"
|
|
|
|
.\" Before making changes, please note the following:
|
|
|
|
.\"
|
|
|
|
.\" * In Roff, each new sentence should begin on a new line. This gives
|
|
|
|
.\" the Roff formatter better control over text-spacing, line-wrapping,
|
|
|
|
.\" and paragraph justification.
|
|
|
|
.\"
|
|
|
|
.\" * Do not leave blank lines in the markup. If whitespace is desired
|
|
|
|
.\" for readability, put a dot in the first column to indicate a null/empty
|
|
|
|
.\" command. Comments and horizontal whitespace may optionally follow: each
|
|
|
|
.\" of these lines are an example of a null command immediately followed by
|
|
|
|
.\" a comment.
|
|
|
|
.\"
|
|
|
|
.\"======================================================================
|
|
|
|
.
|
2022-10-21 15:11:37 +00:00
|
|
|
.tr -\-^\(ha~\(ti`\(ga
|
2018-02-03 13:16:50 +00:00
|
|
|
.Dd 2018
|
|
|
|
.Dt NODE 1
|
|
|
|
.
|
|
|
|
.Sh NAME
|
|
|
|
.Nm node
|
|
|
|
.Nd server-side JavaScript runtime
|
|
|
|
.
|
|
|
|
.\"======================================================================
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm node
|
|
|
|
.Op Ar options
|
|
|
|
.Op Ar v8-options
|
|
|
|
.Op Fl e Ar string | Ar script.js | Fl
|
2018-05-15 05:40:52 +00:00
|
|
|
.Op Fl -
|
2018-02-03 13:16:50 +00:00
|
|
|
.Op Ar arguments ...
|
|
|
|
.
|
|
|
|
.Nm node
|
2018-09-09 14:57:37 +00:00
|
|
|
.Cm inspect
|
2018-02-03 13:16:50 +00:00
|
|
|
.Op Fl e Ar string | Ar script.js | Fl | Ar <host>:<port>
|
|
|
|
.Ar ...
|
|
|
|
.
|
|
|
|
.Nm node
|
|
|
|
.Op Fl -v8-options
|
|
|
|
.
|
|
|
|
.\"======================================================================
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
Node.js is a set of libraries for JavaScript which allows it to be used outside of the browser.
|
|
|
|
It is primarily focused on creating simple, easy-to-build network clients and servers.
|
|
|
|
.Pp
|
|
|
|
Execute
|
|
|
|
.Nm
|
|
|
|
without arguments to start a REPL.
|
|
|
|
.
|
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width 6n
|
2018-05-15 05:40:52 +00:00
|
|
|
.It Sy -
|
2018-04-08 06:33:19 +00:00
|
|
|
Alias for stdin, analogous to the use of - in other command-line utilities.
|
|
|
|
The executed script is read from stdin, and remaining arguments are passed to the script.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2018-05-15 05:40:52 +00:00
|
|
|
.It Fl -
|
2018-11-02 03:41:10 +00:00
|
|
|
Indicate the end of command-line options.
|
2018-04-08 06:33:19 +00:00
|
|
|
Pass the rest of the arguments to the script.
|
|
|
|
.Pp
|
|
|
|
If no script filename or eval/print script is supplied prior to this, then
|
|
|
|
the next argument will be used as a script filename.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -abort-on-uncaught-exception
|
|
|
|
Aborting instead of exiting causes a core file to be generated for analysis.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2023-02-23 18:11:51 +00:00
|
|
|
.It Fl -allow-fs-read
|
|
|
|
Allow file system read access when using the permission model.
|
|
|
|
.
|
|
|
|
.It Fl -allow-fs-write
|
|
|
|
Allow file system write access when using the permission model.
|
|
|
|
.
|
2023-12-21 17:44:11 +00:00
|
|
|
.It Fl -allow-addons
|
|
|
|
Allow using native addons when using the permission model.
|
|
|
|
.
|
2023-02-23 18:11:51 +00:00
|
|
|
.It Fl -allow-child-process
|
|
|
|
Allow spawning process when using the permission model.
|
|
|
|
.
|
2024-06-01 13:13:12 +00:00
|
|
|
.It Fl -allow-wasi
|
|
|
|
Allow execution of WASI when using the permission model.
|
|
|
|
.
|
2023-02-23 18:11:51 +00:00
|
|
|
.It Fl -allow-worker
|
|
|
|
Allow creating worker threads when using the permission model.
|
|
|
|
.
|
2018-05-14 11:09:27 +00:00
|
|
|
.It Fl -completion-bash
|
|
|
|
Print source-able bash completion script for Node.js.
|
|
|
|
.
|
2021-05-21 14:16:12 +00:00
|
|
|
.It Fl C , Fl -conditions Ar string
|
2020-08-26 20:00:01 +00:00
|
|
|
Use custom conditional exports conditions.
|
2020-08-05 19:06:28 +00:00
|
|
|
.Ar string
|
|
|
|
.
|
2019-03-22 23:39:52 +00:00
|
|
|
.It Fl -cpu-prof
|
|
|
|
Start the V8 CPU profiler on start up, and write the CPU profile to disk
|
|
|
|
before exit. If
|
2019-04-19 09:15:04 +00:00
|
|
|
.Fl -cpu-prof-dir
|
|
|
|
is not specified, the profile will be written to the current working directory
|
|
|
|
with a generated file name.
|
2019-03-22 23:39:52 +00:00
|
|
|
.
|
2019-04-19 09:15:04 +00:00
|
|
|
.It Fl -cpu-prof-dir
|
|
|
|
The directory where the CPU profiles generated by
|
2019-03-22 23:39:52 +00:00
|
|
|
.Fl -cpu-prof
|
2019-04-19 09:15:04 +00:00
|
|
|
will be placed.
|
2020-05-27 13:53:46 +00:00
|
|
|
The default value is controlled by the
|
|
|
|
.Fl -diagnostic-dir .
|
2020-09-15 00:28:27 +00:00
|
|
|
command-line option.
|
2019-04-19 09:15:04 +00:00
|
|
|
.
|
2019-05-02 13:10:10 +00:00
|
|
|
.It Fl -cpu-prof-interval
|
|
|
|
The sampling interval in microseconds for the CPU profiles generated by
|
|
|
|
.Fl -cpu-prof .
|
|
|
|
The default is
|
|
|
|
.Sy 1000 .
|
|
|
|
.
|
2019-04-19 09:15:04 +00:00
|
|
|
.It Fl -cpu-prof-name
|
|
|
|
File name of the V8 CPU profile generated with
|
2020-08-26 20:00:01 +00:00
|
|
|
.Fl -cpu-prof .
|
2019-03-22 23:39:52 +00:00
|
|
|
.
|
2020-05-27 13:53:46 +00:00
|
|
|
.It Fl -diagnostic-dir
|
|
|
|
Set the directory for all diagnostic output files.
|
|
|
|
Default is current working directory.
|
|
|
|
Set the directory to which all diagnostic output files will be written to.
|
|
|
|
Defaults to current working directory.
|
|
|
|
.
|
|
|
|
Affects the default output directory of:
|
|
|
|
.Fl -cpu-prof-dir .
|
|
|
|
.Fl -heap-prof-dir .
|
|
|
|
.Fl -redirect-warnings .
|
|
|
|
.
|
2020-03-15 00:54:15 +00:00
|
|
|
.It Fl -disable-proto Ns = Ns Ar mode
|
|
|
|
Disable the `Object.prototype.__proto__` property. If
|
|
|
|
.Ar mode
|
|
|
|
is `delete`, the property will be removed entirely. If
|
|
|
|
.Ar mode
|
|
|
|
is `throw`, accesses to the property will throw an exception with the code
|
|
|
|
`ERR_PROTO_ACCESS`.
|
|
|
|
.
|
2024-04-19 19:35:20 +00:00
|
|
|
.It Fl -disable-wasm-trap-handler Ns = Ns Ar mode
|
|
|
|
Disable trap-handler-based WebAssembly bound checks and fall back to
|
|
|
|
inline bound checks so that WebAssembly can be run with limited virtual
|
|
|
|
memory.
|
|
|
|
.
|
2019-10-23 18:06:57 +00:00
|
|
|
.It Fl -disallow-code-generation-from-strings
|
|
|
|
Make built-in language features like `eval` and `new Function` that generate
|
|
|
|
code from strings throw an exception instead. This does not affect the Node.js
|
|
|
|
`vm` module.
|
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -enable-fips
|
|
|
|
Enable FIPS-compliant crypto at startup.
|
|
|
|
Requires Node.js to be built with
|
|
|
|
.Sy ./configure --openssl-fips .
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2019-12-24 04:15:58 +00:00
|
|
|
.It Fl -enable-source-maps
|
2021-02-27 19:16:06 +00:00
|
|
|
Enable Source Map V3 support for stack traces.
|
2019-12-24 04:15:58 +00:00
|
|
|
.
|
2024-09-13 22:26:17 +00:00
|
|
|
.It Fl -entry-url
|
|
|
|
Interpret the entry point as a URL.
|
|
|
|
.
|
2023-09-29 06:18:44 +00:00
|
|
|
.It Fl -experimental-default-type Ns = Ns Ar type
|
|
|
|
Interpret as either ES modules or CommonJS modules input via --eval or STDIN, when --input-type is unspecified;
|
|
|
|
.js or extensionless files with no sibling or parent package.json;
|
|
|
|
.js or extensionless files whose nearest parent package.json lacks a "type" field, unless under node_modules.
|
|
|
|
.
|
2019-12-19 21:25:52 +00:00
|
|
|
.It Fl -experimental-import-meta-resolve
|
|
|
|
Enable experimental ES modules support for import.meta.resolve().
|
|
|
|
.
|
2020-03-04 23:34:28 +00:00
|
|
|
.It Fl -experimental-loader Ns = Ns Ar module
|
|
|
|
Specify the
|
|
|
|
.Ar module
|
|
|
|
to use as a custom module loader.
|
|
|
|
.
|
2023-02-23 18:11:51 +00:00
|
|
|
.It Fl -experimental-permission
|
|
|
|
Enable the experimental permission model.
|
|
|
|
.
|
2022-05-02 16:46:31 +00:00
|
|
|
.It Fl -experimental-shadow-realm
|
|
|
|
Use this flag to enable ShadowRealm support.
|
|
|
|
.
|
2023-01-08 02:16:54 +00:00
|
|
|
.It Fl -experimental-test-coverage
|
|
|
|
Enable code coverage in the test runner.
|
|
|
|
.
|
2024-07-13 15:10:59 +00:00
|
|
|
.It Fl -experimental-test-isolation Ns = Ns Ar mode
|
|
|
|
Configures the type of test isolation used in the test runner.
|
|
|
|
.
|
2024-05-19 05:09:09 +00:00
|
|
|
.It Fl -experimental-test-module-mocks
|
|
|
|
Enable module mocking in the test runner.
|
|
|
|
.
|
2024-07-24 16:30:06 +00:00
|
|
|
.It Fl -experimental-strip-types
|
|
|
|
Enable experimental type-stripping for TypeScript files.
|
|
|
|
.
|
2024-08-12 13:07:49 +00:00
|
|
|
.It Fl -experimental-transform-types
|
|
|
|
Enable transformation of TypeScript-only syntax into JavaScript code.
|
|
|
|
.
|
2024-05-13 05:32:08 +00:00
|
|
|
.It Fl -experimental-eventsource
|
|
|
|
Enable experimental support for the EventSource Web API.
|
|
|
|
.
|
2024-02-04 14:03:39 +00:00
|
|
|
.It Fl -no-experimental-websocket
|
|
|
|
Disable experimental support for the WebSocket API.
|
|
|
|
.
|
2023-09-15 14:32:14 +00:00
|
|
|
.It Fl -experimental-webstorage
|
|
|
|
Enable experimental support for the Web Storage API.
|
|
|
|
.
|
2021-07-08 18:33:54 +00:00
|
|
|
.It Fl -no-experimental-repl-await
|
|
|
|
Disable top-level await keyword support in REPL.
|
2018-04-18 15:50:35 +00:00
|
|
|
.
|
2024-11-19 03:23:18 +00:00
|
|
|
.It Fl -no-experimental-sqlite
|
|
|
|
Disable the experimental node:sqlite module.
|
|
|
|
.
|
2018-05-15 05:40:52 +00:00
|
|
|
.It Fl -experimental-vm-modules
|
2018-04-08 06:33:19 +00:00
|
|
|
Enable experimental ES module support in VM module.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2019-12-15 16:30:45 +00:00
|
|
|
.It Fl -experimental-wasi-unstable-preview1
|
2023-03-28 19:28:41 +00:00
|
|
|
Enable experimental WebAssembly System Interface support. This
|
|
|
|
flag is no longer required as WASI is enabled by default.
|
2019-09-04 21:56:51 +00:00
|
|
|
.
|
2019-05-29 12:51:32 +00:00
|
|
|
.It Fl -experimental-wasm-modules
|
|
|
|
Enable experimental WebAssembly module support.
|
|
|
|
.
|
2019-12-24 04:19:26 +00:00
|
|
|
.It Fl -force-context-aware
|
|
|
|
Disable loading native addons that are not context-aware.
|
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -force-fips
|
|
|
|
Force FIPS-compliant crypto on startup
|
|
|
|
(Cannot be disabled from script code).
|
|
|
|
Same requirements as
|
|
|
|
.Fl -enable-fips .
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2019-01-24 18:56:33 +00:00
|
|
|
.It Fl -frozen-intrinsics
|
|
|
|
Enable experimental frozen intrinsics support.
|
|
|
|
.
|
2020-10-21 19:41:11 +00:00
|
|
|
.It Fl -heapsnapshot-near-heap-limit Ns = Ns Ar max_count
|
|
|
|
Generate heap snapshot when the V8 heap usage is approaching the heap limit.
|
|
|
|
No more than the specified number of snapshots will be generated.
|
|
|
|
.
|
2019-04-08 14:20:26 +00:00
|
|
|
.It Fl -heapsnapshot-signal Ns = Ns Ar signal
|
|
|
|
Generate heap snapshot on specified signal.
|
|
|
|
.
|
2019-04-23 03:47:28 +00:00
|
|
|
.It Fl -heap-prof
|
|
|
|
Start the V8 heap profiler on start up, and write the heap profile to disk
|
|
|
|
before exit. If
|
|
|
|
.Fl -heap-prof-dir
|
|
|
|
is not specified, the profile will be written to the current working directory
|
|
|
|
with a generated file name.
|
|
|
|
.
|
|
|
|
.It Fl -heap-prof-dir
|
|
|
|
The directory where the heap profiles generated by
|
|
|
|
.Fl -heap-prof
|
|
|
|
will be placed.
|
2020-05-27 13:53:46 +00:00
|
|
|
The default value is controlled by the
|
|
|
|
.Fl -diagnostic-dir .
|
2020-09-15 00:28:27 +00:00
|
|
|
command-line option.
|
2019-04-23 03:47:28 +00:00
|
|
|
.
|
|
|
|
.It Fl -heap-prof-interval
|
|
|
|
The average sampling interval in bytes for the heap profiles generated by
|
|
|
|
.Fl -heap-prof .
|
|
|
|
The default is
|
|
|
|
.Sy 512 * 1024 .
|
|
|
|
.
|
|
|
|
.It Fl -heap-prof-name
|
|
|
|
File name of the V8 heap profile generated with
|
2020-08-26 20:00:01 +00:00
|
|
|
.Fl -heap-prof .
|
2019-04-23 03:47:28 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -icu-data-dir Ns = Ns Ar file
|
|
|
|
Specify ICU data load path.
|
|
|
|
Overrides
|
|
|
|
.Ev NODE_ICU_DATA .
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2019-04-15 17:29:56 +00:00
|
|
|
.It Fl -input-type Ns = Ns Ar type
|
|
|
|
Set the module resolution type for input via --eval, --print or STDIN.
|
|
|
|
.
|
2018-02-03 13:16:50 +00:00
|
|
|
.It Fl -inspect-brk Ns = Ns Ar [host:]port
|
|
|
|
Activate inspector on
|
|
|
|
.Ar host:port
|
|
|
|
and break at start of user script.
|
|
|
|
.
|
|
|
|
.It Fl -inspect-port Ns = Ns Ar [host:]port
|
|
|
|
Set the
|
|
|
|
.Ar host:port
|
|
|
|
to be used when the inspector is activated.
|
|
|
|
.
|
2019-12-24 04:21:01 +00:00
|
|
|
.It Fl -inspect-publish-uid=stderr,http
|
|
|
|
Specify how the inspector WebSocket URL is exposed.
|
|
|
|
Valid values are
|
|
|
|
.Sy stderr
|
|
|
|
and
|
|
|
|
.Sy http .
|
|
|
|
Default is
|
|
|
|
.Sy stderr,http .
|
|
|
|
.
|
2024-05-11 18:48:30 +00:00
|
|
|
.It Fl -inspect-wait Ns = Ns Ar [host:]port
|
|
|
|
Activate inspector on
|
|
|
|
.Ar host:port
|
|
|
|
and wait for debugger to be attached.
|
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -inspect Ns = Ns Ar [host:]port
|
|
|
|
Activate inspector on
|
|
|
|
.Ar host:port .
|
|
|
|
Default is
|
|
|
|
.Sy 127.0.0.1:9229 .
|
|
|
|
.Pp
|
|
|
|
V8 Inspector integration allows attaching Chrome DevTools and IDEs to Node.js instances for debugging and profiling.
|
2018-04-17 17:04:03 +00:00
|
|
|
It uses the Chrome DevTools Protocol.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2019-11-20 19:48:58 +00:00
|
|
|
.It Fl -insecure-http-parser
|
|
|
|
Use an insecure HTTP parser that accepts invalid HTTP headers. This may allow
|
|
|
|
interoperability with non-conformant HTTP implementations. It may also allow
|
|
|
|
request smuggling and other HTTP attacks that rely on invalid headers being
|
|
|
|
accepted. Avoid using this option.
|
|
|
|
.
|
2020-03-04 23:34:28 +00:00
|
|
|
.It Fl -jitless
|
|
|
|
Disable runtime allocation of executable memory. This may be required on
|
|
|
|
some platforms for security reasons. It can also reduce attack surface on
|
|
|
|
other platforms, but the performance impact may be severe.
|
|
|
|
.
|
|
|
|
.Pp
|
|
|
|
This flag is inherited from V8 and is subject to change upstream. It may
|
|
|
|
disappear in a non-semver-major release.
|
|
|
|
.
|
2023-09-15 14:32:14 +00:00
|
|
|
.It Fl -localstorage-file Ns = Ns Ar file
|
|
|
|
The file used to store localStorage data.
|
|
|
|
.
|
2018-12-03 17:27:46 +00:00
|
|
|
.It Fl -max-http-header-size Ns = Ns Ar size
|
2022-04-19 22:46:37 +00:00
|
|
|
Specify the maximum size of HTTP headers in bytes. Defaults to 16 KiB.
|
2018-12-03 17:27:46 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -napi-modules
|
2018-05-15 05:40:52 +00:00
|
|
|
This option is a no-op.
|
|
|
|
It is kept for compatibility.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -no-deprecation
|
|
|
|
Silence deprecation warnings.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2021-09-01 23:59:45 +00:00
|
|
|
.It Fl -no-extra-info-on-fatal-exception
|
|
|
|
Hide extra information on fatal exception that causes exit.
|
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -no-force-async-hooks-checks
|
|
|
|
Disable runtime checks for `async_hooks`.
|
|
|
|
These will still be enabled dynamically when `async_hooks` is enabled.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2021-09-02 13:17:42 +00:00
|
|
|
.It Fl -no-addons
|
|
|
|
Disable the `node-addons` exports condition as well as disable loading native
|
|
|
|
addons. When `--no-addons` is specified, calling `process.dlopen` or requiring
|
|
|
|
a native C++ addon will fail and throw an exception.
|
|
|
|
.
|
2021-08-16 00:58:58 +00:00
|
|
|
.It Fl -no-global-search-paths
|
|
|
|
Do not search modules from global paths.
|
|
|
|
.
|
2018-02-03 13:16:50 +00:00
|
|
|
.It Fl -no-warnings
|
2016-01-20 19:38:35 +00:00
|
|
|
Silence all process warnings (including deprecations).
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2020-10-04 10:51:05 +00:00
|
|
|
.It Fl -node-memory-debug
|
|
|
|
Enable extra debug checks for memory leaks in Node.js internals. This is
|
|
|
|
usually only useful for developers debugging Node.js itself.
|
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -openssl-config Ns = Ns Ar file
|
|
|
|
Load an OpenSSL configuration file on startup.
|
|
|
|
Among other uses, this can be used to enable FIPS-compliant crypto if Node.js is built with
|
|
|
|
.Sy ./configure --openssl-fips .
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -pending-deprecation
|
|
|
|
Emit pending deprecation warnings.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -preserve-symlinks
|
2018-04-10 07:40:56 +00:00
|
|
|
Instructs the module loader to preserve symbolic links when resolving and caching modules other than the main module.
|
|
|
|
.
|
2018-05-15 05:40:52 +00:00
|
|
|
.It Fl -preserve-symlinks-main
|
2018-04-10 07:40:56 +00:00
|
|
|
Instructs the module loader to preserve symbolic links when resolving and caching the main module.
|
2018-04-08 06:33:19 +00:00
|
|
|
.
|
2018-05-20 10:05:08 +00:00
|
|
|
.It Fl -prof
|
|
|
|
Generate V8 profiler output.
|
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -prof-process
|
|
|
|
Process V8 profiler output generated using the V8 option
|
|
|
|
.Fl -prof .
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
|
|
|
.It Fl -redirect-warnings Ns = Ns Ar file
|
|
|
|
Write process warnings to the given
|
|
|
|
.Ar file
|
|
|
|
instead of printing to stderr.
|
|
|
|
.
|
2020-03-13 16:45:39 +00:00
|
|
|
.It Fl -report-compact
|
|
|
|
Write
|
|
|
|
.Sy diagnostic reports
|
|
|
|
in a compact format, single-line JSON.
|
|
|
|
.
|
2020-05-27 15:05:17 +00:00
|
|
|
.It Fl -report-dir Fl -report-directory
|
2019-04-19 15:12:28 +00:00
|
|
|
Location at which the
|
|
|
|
.Sy diagnostic report
|
|
|
|
will be generated.
|
2020-05-27 13:53:46 +00:00
|
|
|
The `file` name may be an absolute path. If it is not, the default directory it will
|
|
|
|
be written to is controlled by the
|
|
|
|
.Fl -diagnostic-dir .
|
2020-09-15 00:28:27 +00:00
|
|
|
command-line option.
|
2019-04-19 15:12:28 +00:00
|
|
|
.
|
|
|
|
.It Fl -report-filename
|
|
|
|
Name of the file to which the
|
|
|
|
.Sy diagnostic report
|
|
|
|
will be written.
|
|
|
|
.
|
|
|
|
.It Fl -report-on-fatalerror
|
|
|
|
Enables the
|
|
|
|
.Sy diagnostic report
|
2020-03-13 03:24:01 +00:00
|
|
|
to be triggered on fatal errors (internal errors within the Node.js runtime such
|
|
|
|
as out of memory) that leads to termination of the application. Useful to
|
|
|
|
inspect various diagnostic data elements such as heap, stack, event loop state,
|
|
|
|
resource consumption etc. to reason about the fatal error.
|
2019-04-19 15:12:28 +00:00
|
|
|
.
|
|
|
|
.It Fl -report-on-signal
|
|
|
|
Enables
|
|
|
|
.Sy diagnostic report
|
2020-03-13 03:24:01 +00:00
|
|
|
to be generated upon receiving the specified (or predefined) signal to the
|
|
|
|
running Node.js process. Default signal is SIGUSR2.
|
2019-04-19 15:12:28 +00:00
|
|
|
.
|
|
|
|
.It Fl -report-signal
|
|
|
|
Sets or resets the signal for
|
|
|
|
.Sy diagnostic report
|
|
|
|
generation (not supported on Windows). Default signal is SIGUSR2.
|
|
|
|
.
|
|
|
|
.It Fl -report-uncaught-exception
|
|
|
|
Enables
|
|
|
|
.Sy diagnostic report
|
2020-03-13 03:24:01 +00:00
|
|
|
to be generated on un-caught exceptions. Useful when inspecting JavaScript
|
|
|
|
stack in conjunction with native stack and other runtime environment data.
|
2019-04-19 15:12:28 +00:00
|
|
|
.
|
2021-01-04 17:06:26 +00:00
|
|
|
.It Fl -secure-heap Ns = Ns Ar n
|
|
|
|
Specify the size of the OpenSSL secure heap. Any value less than 2 disables
|
|
|
|
the secure heap. The default is 0. The value must be a power of two.
|
|
|
|
.
|
|
|
|
.It Fl -secure-heap-min Ns = Ns Ar n
|
|
|
|
Specify the minimum allocation from the OpenSSL secure heap. The default is 2. The value must be a power of two.
|
|
|
|
.
|
2022-04-15 17:37:28 +00:00
|
|
|
.It Fl -test
|
|
|
|
Starts the Node.js command line test runner.
|
|
|
|
.
|
2023-10-01 15:46:14 +00:00
|
|
|
.It Fl -test-concurrency
|
|
|
|
The maximum number of test files that the test runner CLI will execute
|
|
|
|
concurrently.
|
|
|
|
.
|
2024-08-23 17:02:11 +00:00
|
|
|
.It Fl -test-coverage-branches Ns = Ns Ar threshold
|
|
|
|
Require a minimum threshold for branch coverage (0 - 100).
|
|
|
|
.
|
2024-07-14 22:37:45 +00:00
|
|
|
.It Fl -test-coverage-exclude
|
|
|
|
A glob pattern that excludes matching files from the coverage report
|
|
|
|
.
|
2024-08-23 17:02:11 +00:00
|
|
|
.It Fl -test-coverage-functions Ns = Ns Ar threshold
|
|
|
|
Require a minimum threshold for function coverage (0 - 100).
|
|
|
|
.
|
2024-07-14 22:37:45 +00:00
|
|
|
.It Fl -test-coverage-include
|
|
|
|
A glob pattern that only includes matching files in the coverage report
|
|
|
|
.
|
2024-08-23 17:02:11 +00:00
|
|
|
.It Fl -test-coverage-lines Ns = Ns Ar threshold
|
|
|
|
Require a minimum threshold for line coverage (0 - 100).
|
|
|
|
.
|
2024-03-13 10:49:15 +00:00
|
|
|
.It Fl -test-force-exit
|
|
|
|
Configures the test runner to exit the process once all known tests have
|
|
|
|
finished executing even if the event loop would otherwise remain active.
|
|
|
|
.
|
2022-09-01 01:33:39 +00:00
|
|
|
.It Fl -test-name-pattern
|
|
|
|
A regular expression that configures the test runner to only execute tests
|
|
|
|
whose name matches the provided pattern.
|
|
|
|
.
|
2023-03-08 21:49:43 +00:00
|
|
|
.It Fl -test-reporter
|
|
|
|
A test reporter to use when running tests.
|
|
|
|
.
|
|
|
|
.It Fl -test-reporter-destination
|
|
|
|
The destination for the corresponding test reporter.
|
|
|
|
.
|
2022-04-04 14:14:49 +00:00
|
|
|
.It Fl -test-only
|
|
|
|
Configures the test runner to only execute top level tests that have the `only`
|
|
|
|
option set.
|
|
|
|
.
|
2023-07-05 03:57:28 +00:00
|
|
|
.It Fl -test-shard
|
|
|
|
Test suite shard to execute in a format of <index>/<total>.
|
2024-04-18 20:59:50 +00:00
|
|
|
.
|
|
|
|
.It Fl -test-skip-pattern
|
|
|
|
A regular expression that configures the test runner to skip tests
|
|
|
|
whose name matches the provided pattern.
|
|
|
|
.
|
2023-11-08 14:02:12 +00:00
|
|
|
.It Fl -test-timeout
|
|
|
|
A number of milliseconds the test execution will fail after.
|
2023-07-05 03:57:28 +00:00
|
|
|
.
|
2024-05-18 16:32:41 +00:00
|
|
|
.It Fl -test-update-snapshots
|
|
|
|
Regenerates the snapshot file used by the test runner for snapshot testing.
|
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -throw-deprecation
|
|
|
|
Throw errors for deprecations.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2018-06-22 23:16:03 +00:00
|
|
|
.It Fl -title Ns = Ns Ar title
|
|
|
|
Specify process.title on startup.
|
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -tls-cipher-list Ns = Ns Ar list
|
|
|
|
Specify an alternative default TLS cipher list.
|
|
|
|
Requires Node.js to be built with crypto support. (Default)
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2019-10-22 03:44:20 +00:00
|
|
|
.It Fl -tls-keylog Ns = Ns Ar file
|
|
|
|
Log TLS key material to a file. The key material is in NSS SSLKEYLOGFILE
|
|
|
|
format and can be used by software (such as Wireshark) to decrypt the TLS
|
|
|
|
traffic.
|
|
|
|
.
|
tls: support TLSv1.3
This introduces TLS1.3 support and makes it the default max protocol,
but also supports CLI/NODE_OPTIONS switches to disable it if necessary.
TLS1.3 is a major update to the TLS protocol, with many security
enhancements. It should be preferred over TLS1.2 whenever possible.
TLS1.3 is different enough that even though the OpenSSL APIs are
technically API/ABI compatible, that when TLS1.3 is negotiated, the
timing of protocol records and of callbacks broke assumptions hard-coded
into the 'tls' module.
This change introduces no API incompatibilities when TLS1.2 is
negotiated. It is the intention that it be backported to current and LTS
release lines with the default maximum TLS protocol reset to 'TLSv1.2'.
This will allow users of those lines to explicitly enable TLS1.3 if they
want.
API incompatibilities between TLS1.2 and TLS1.3 are:
- Renegotiation is not supported by TLS1.3 protocol, attempts to call
`.renegotiate()` will always fail.
- Compiling against a system OpenSSL lower than 1.1.1 is no longer
supported (OpenSSL-1.1.0 used to be supported with configure flags).
- Variations of `conn.write('data'); conn.destroy()` have undefined
behaviour according to the streams API. They may or may not send the
'data', and may or may not cause a ERR_STREAM_DESTROYED error to be
emitted. This has always been true, but conditions under which the write
suceeds is slightly but observably different when TLS1.3 is negotiated
vs when TLS1.2 or below is negotiated.
- If TLS1.3 is negotiated, and a server calls `conn.end()` in its
'secureConnection' listener without any data being written, the client
will not receive session tickets (no 'session' events will be emitted,
and `conn.getSession()` will never return a resumable session).
- The return value of `conn.getSession()` API may not return a resumable
session if called right after the handshake. The effect will be that
clients using the legacy `getSession()` API will resume sessions if
TLS1.2 is negotiated, but will do full handshakes if TLS1.3 is
negotiated. See https://github.com/nodejs/node/pull/25831 for more
information.
PR-URL: https://github.com/nodejs/node/pull/26209
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2018-11-29 01:58:08 +00:00
|
|
|
.It Fl -tls-max-v1.2
|
|
|
|
Set default maxVersion to 'TLSv1.2'. Use to disable support for TLSv1.3.
|
2018-10-22 09:40:28 +00:00
|
|
|
.
|
tls: support TLSv1.3
This introduces TLS1.3 support and makes it the default max protocol,
but also supports CLI/NODE_OPTIONS switches to disable it if necessary.
TLS1.3 is a major update to the TLS protocol, with many security
enhancements. It should be preferred over TLS1.2 whenever possible.
TLS1.3 is different enough that even though the OpenSSL APIs are
technically API/ABI compatible, that when TLS1.3 is negotiated, the
timing of protocol records and of callbacks broke assumptions hard-coded
into the 'tls' module.
This change introduces no API incompatibilities when TLS1.2 is
negotiated. It is the intention that it be backported to current and LTS
release lines with the default maximum TLS protocol reset to 'TLSv1.2'.
This will allow users of those lines to explicitly enable TLS1.3 if they
want.
API incompatibilities between TLS1.2 and TLS1.3 are:
- Renegotiation is not supported by TLS1.3 protocol, attempts to call
`.renegotiate()` will always fail.
- Compiling against a system OpenSSL lower than 1.1.1 is no longer
supported (OpenSSL-1.1.0 used to be supported with configure flags).
- Variations of `conn.write('data'); conn.destroy()` have undefined
behaviour according to the streams API. They may or may not send the
'data', and may or may not cause a ERR_STREAM_DESTROYED error to be
emitted. This has always been true, but conditions under which the write
suceeds is slightly but observably different when TLS1.3 is negotiated
vs when TLS1.2 or below is negotiated.
- If TLS1.3 is negotiated, and a server calls `conn.end()` in its
'secureConnection' listener without any data being written, the client
will not receive session tickets (no 'session' events will be emitted,
and `conn.getSession()` will never return a resumable session).
- The return value of `conn.getSession()` API may not return a resumable
session if called right after the handshake. The effect will be that
clients using the legacy `getSession()` API will resume sessions if
TLS1.2 is negotiated, but will do full handshakes if TLS1.3 is
negotiated. See https://github.com/nodejs/node/pull/25831 for more
information.
PR-URL: https://github.com/nodejs/node/pull/26209
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2018-11-29 01:58:08 +00:00
|
|
|
.It Fl -tls-max-v1.3
|
|
|
|
Set default maxVersion to 'TLSv1.3'. Use to enable support for TLSv1.3.
|
|
|
|
.
|
|
|
|
.It Fl -tls-min-v1.0
|
|
|
|
Set default minVersion to 'TLSv1'. Use for compatibility with old TLS clients
|
|
|
|
or servers.
|
|
|
|
.
|
|
|
|
.It Fl -tls-min-v1.1
|
|
|
|
Set default minVersion to 'TLSv1.1'. Use for compatibility with old TLS clients
|
|
|
|
or servers.
|
|
|
|
.
|
2019-05-01 18:45:45 +00:00
|
|
|
.It Fl -tls-min-v1.2
|
|
|
|
Set default minVersion to 'TLSv1.2'. This is the default for 12.x and later,
|
|
|
|
but the option is supported for compatibility with older Node.js versions.
|
|
|
|
.
|
tls: support TLSv1.3
This introduces TLS1.3 support and makes it the default max protocol,
but also supports CLI/NODE_OPTIONS switches to disable it if necessary.
TLS1.3 is a major update to the TLS protocol, with many security
enhancements. It should be preferred over TLS1.2 whenever possible.
TLS1.3 is different enough that even though the OpenSSL APIs are
technically API/ABI compatible, that when TLS1.3 is negotiated, the
timing of protocol records and of callbacks broke assumptions hard-coded
into the 'tls' module.
This change introduces no API incompatibilities when TLS1.2 is
negotiated. It is the intention that it be backported to current and LTS
release lines with the default maximum TLS protocol reset to 'TLSv1.2'.
This will allow users of those lines to explicitly enable TLS1.3 if they
want.
API incompatibilities between TLS1.2 and TLS1.3 are:
- Renegotiation is not supported by TLS1.3 protocol, attempts to call
`.renegotiate()` will always fail.
- Compiling against a system OpenSSL lower than 1.1.1 is no longer
supported (OpenSSL-1.1.0 used to be supported with configure flags).
- Variations of `conn.write('data'); conn.destroy()` have undefined
behaviour according to the streams API. They may or may not send the
'data', and may or may not cause a ERR_STREAM_DESTROYED error to be
emitted. This has always been true, but conditions under which the write
suceeds is slightly but observably different when TLS1.3 is negotiated
vs when TLS1.2 or below is negotiated.
- If TLS1.3 is negotiated, and a server calls `conn.end()` in its
'secureConnection' listener without any data being written, the client
will not receive session tickets (no 'session' events will be emitted,
and `conn.getSession()` will never return a resumable session).
- The return value of `conn.getSession()` API may not return a resumable
session if called right after the handshake. The effect will be that
clients using the legacy `getSession()` API will resume sessions if
TLS1.2 is negotiated, but will do full handshakes if TLS1.3 is
negotiated. See https://github.com/nodejs/node/pull/25831 for more
information.
PR-URL: https://github.com/nodejs/node/pull/26209
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2018-11-29 01:58:08 +00:00
|
|
|
.It Fl -tls-min-v1.3
|
|
|
|
Set default minVersion to 'TLSv1.3'. Use to disable support for TLSv1.2 in
|
|
|
|
favour of TLSv1.3, which is more secure.
|
2018-10-22 09:40:28 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -trace-deprecation
|
|
|
|
Print stack traces for deprecations.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
|
|
|
.It Fl -trace-event-categories Ar categories
|
|
|
|
A comma-separated list of categories that should be traced when trace event tracing is enabled using
|
|
|
|
.Fl -trace-events-enabled .
|
|
|
|
.
|
2018-01-31 16:12:09 +00:00
|
|
|
.It Fl -trace-event-file-pattern Ar pattern
|
|
|
|
Template string specifying the filepath for the trace event data, it
|
2018-05-15 05:40:52 +00:00
|
|
|
supports
|
|
|
|
.Sy ${rotation}
|
|
|
|
and
|
|
|
|
.Sy ${pid} .
|
2018-01-31 16:12:09 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -trace-events-enabled
|
|
|
|
Enable the collection of trace event tracing information.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2019-11-17 12:02:01 +00:00
|
|
|
.It Fl -trace-exit
|
|
|
|
Prints a stack trace whenever an environment is exited proactively,
|
|
|
|
i.e. invoking `process.exit()`.
|
2019-08-19 13:03:08 +00:00
|
|
|
.It Fl -trace-sigint
|
|
|
|
Prints a stack trace on SIGINT.
|
2019-11-17 12:02:01 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -trace-sync-io
|
|
|
|
Print a stack trace whenever synchronous I/O is detected after the first turn of the event loop.
|
|
|
|
.
|
2019-04-30 16:19:10 +00:00
|
|
|
.It Fl -trace-tls
|
|
|
|
Prints TLS packet trace information to stderr.
|
|
|
|
.
|
2019-10-18 15:05:35 +00:00
|
|
|
.It Fl -trace-uncaught
|
|
|
|
Print stack traces for uncaught exceptions; usually, the stack trace associated
|
|
|
|
with the creation of an
|
|
|
|
.Sy Error
|
|
|
|
is printed, whereas this makes Node.js also
|
|
|
|
print the stack trace associated with throwing the value (which does not need
|
|
|
|
to be an
|
|
|
|
.Sy Error
|
|
|
|
instance).
|
|
|
|
.Pp
|
|
|
|
Enabling this option may affect garbage collection behavior negatively.
|
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -trace-warnings
|
|
|
|
Print stack traces for process warnings (including deprecations).
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
|
|
|
.It Fl -track-heap-objects
|
2016-02-29 21:49:30 +00:00
|
|
|
Track heap object allocations for heap snapshots.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2021-05-04 11:33:07 +00:00
|
|
|
.It Fl -unhandled-rejections=mode
|
2019-03-11 19:46:43 +00:00
|
|
|
Define the behavior for unhandled rejections. Can be one of `strict` (raise an error), `warn` (enforce warnings) or `none` (silence warnings).
|
|
|
|
.
|
2018-05-15 05:40:52 +00:00
|
|
|
.It Fl -use-bundled-ca , Fl -use-openssl-ca
|
2018-04-08 06:33:19 +00:00
|
|
|
Use bundled Mozilla CA store as supplied by current Node.js version or use OpenSSL's default CA store.
|
|
|
|
The default store is selectable at build-time.
|
|
|
|
.Pp
|
|
|
|
The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store that is fixed at release time.
|
|
|
|
It is identical on all supported platforms.
|
|
|
|
.Pp
|
|
|
|
Using OpenSSL store allows for external modifications of the store.
|
|
|
|
For most Linux and BSD distributions, this store is maintained by the distribution maintainers and system administrators.
|
|
|
|
OpenSSL CA store location is dependent on configuration of the OpenSSL library but this can be altered at runtime using environment variables.
|
|
|
|
.Pp
|
|
|
|
See
|
|
|
|
.Ev SSL_CERT_DIR
|
|
|
|
and
|
|
|
|
.Ev SSL_CERT_FILE .
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2019-12-13 19:59:37 +00:00
|
|
|
.It Fl -use-largepages Ns = Ns Ar mode
|
|
|
|
Re-map the Node.js static code to large memory pages at startup. If supported on
|
|
|
|
the target system, this will cause the Node.js static code to be moved onto 2
|
|
|
|
MiB pages instead of 4 KiB pages.
|
|
|
|
.Pp
|
|
|
|
.Ar mode
|
|
|
|
must have one of the following values:
|
|
|
|
`off` (the default value, meaning do not map), `on` (map and ignore failure,
|
|
|
|
reporting it to stderr), or `silent` (map and silently ignore failure).
|
|
|
|
.
|
2018-02-03 13:16:50 +00:00
|
|
|
.It Fl -v8-options
|
|
|
|
Print V8 command-line options.
|
|
|
|
.
|
|
|
|
.It Fl -v8-pool-size Ns = Ns Ar num
|
|
|
|
Set V8's thread pool size which will be used to allocate background jobs.
|
|
|
|
If set to 0 then V8 will choose an appropriate size of the thread pool based on the number of online processors.
|
|
|
|
If the value provided is larger than V8's maximum, then the largest value will be chosen.
|
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl -zero-fill-buffers
|
|
|
|
Automatically zero-fills all newly allocated Buffer and SlowBuffer instances.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl c , Fl -check
|
|
|
|
Check the script's syntax without executing it.
|
|
|
|
Exits with an error code if script is invalid.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl e , Fl -eval Ar string
|
|
|
|
Evaluate
|
|
|
|
.Ar string
|
|
|
|
as JavaScript.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl h , Fl -help
|
2018-11-02 03:41:10 +00:00
|
|
|
Print command-line options.
|
2018-04-08 06:33:19 +00:00
|
|
|
The output of this option is less detailed than this document.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl i , Fl -interactive
|
|
|
|
Open the REPL even if stdin does not appear to be a terminal.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl p , Fl -print Ar string
|
|
|
|
Identical to
|
|
|
|
.Fl e ,
|
|
|
|
but prints the result.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl r , Fl -require Ar module
|
|
|
|
Preload the specified
|
|
|
|
.Ar module
|
|
|
|
at startup.
|
|
|
|
Follows `require()`'s module resolution rules.
|
|
|
|
.Ar module
|
2018-10-30 05:04:25 +00:00
|
|
|
may be either a path to a file, or a Node.js module name.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Fl v , Fl -version
|
|
|
|
Print node's version.
|
2018-02-03 13:16:50 +00:00
|
|
|
.El
|
|
|
|
.
|
|
|
|
.\" =====================================================================
|
|
|
|
.Sh ENVIRONMENT
|
|
|
|
.Bl -tag -width 6n
|
2021-02-22 18:50:01 +00:00
|
|
|
.It Ev FORCE_COLOR
|
|
|
|
Used to enable ANSI colorized output. The value may be one of:
|
|
|
|
.Ar 1
|
|
|
|
,
|
|
|
|
.Ar true
|
|
|
|
, or
|
|
|
|
.Ar an empty string
|
|
|
|
to
|
|
|
|
indicate 16-color support,
|
|
|
|
.Ar 2
|
|
|
|
to indicate 256-color support, or
|
|
|
|
.Ar 3
|
|
|
|
to indicate 16 million-color support. When used and set to a supported
|
|
|
|
value, both the NO_COLOR and NODE_DISABLE_COLORS environment variables
|
|
|
|
are ignored. Any other value will result in colorized output being
|
|
|
|
disabled.
|
|
|
|
.
|
|
|
|
.It Ev NO_COLOR
|
|
|
|
Alias for NODE_DISABLE_COLORS
|
|
|
|
.
|
2018-02-03 13:16:50 +00:00
|
|
|
.It Ev NODE_DEBUG Ar modules...
|
|
|
|
Comma-separated list of core modules that should print debug information.
|
|
|
|
.
|
2018-11-15 21:33:23 +00:00
|
|
|
.It Ev NODE_DEBUG_NATIVE Ar modules...
|
|
|
|
Comma-separated list of C++ core modules that should print debug information.
|
|
|
|
.
|
2018-02-03 13:16:50 +00:00
|
|
|
.It Ev NODE_DISABLE_COLORS
|
|
|
|
When set to
|
|
|
|
.Ar 1 ,
|
|
|
|
colors will not be used in the REPL.
|
|
|
|
.
|
|
|
|
.It Ev NODE_EXTRA_CA_CERTS Ar file
|
|
|
|
When set, the well-known
|
|
|
|
.Dq root
|
|
|
|
CAs (like VeriSign) will be extended with the extra certificates in
|
|
|
|
.Ar file .
|
|
|
|
The file should consist of one or more trusted certificates in PEM format.
|
|
|
|
.Pp
|
|
|
|
If
|
|
|
|
.Ar file
|
|
|
|
is missing or misformatted, a message will be emitted once using
|
|
|
|
.Sy process.emitWarning() ,
|
|
|
|
but any errors are otherwise ignored.
|
2018-10-19 21:39:46 +00:00
|
|
|
.Pp
|
|
|
|
This environment variable is ignored when `node` runs as setuid root or
|
|
|
|
has Linux file capabilities set.
|
2021-03-01 22:00:18 +00:00
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Ar NODE_EXTRA_CA_CERTS
|
|
|
|
environment variable is only read when the Node.js process is first launched.
|
|
|
|
Changing the value at runtime using
|
|
|
|
.Ar process.env.NODE_EXTRA_CA_CERTS
|
|
|
|
has no effect on the current process.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
|
|
|
.It Ev NODE_ICU_DATA Ar file
|
|
|
|
Data path for ICU (Intl object) data.
|
|
|
|
Will extend linked-in data when compiled with small-icu support.
|
|
|
|
.
|
|
|
|
.It Ev NODE_NO_WARNINGS
|
|
|
|
When set to
|
|
|
|
.Ar 1 ,
|
|
|
|
process warnings are silenced.
|
|
|
|
.
|
|
|
|
.It Ev NODE_OPTIONS Ar options...
|
|
|
|
A space-separated list of command-line
|
|
|
|
.Ar options ,
|
2020-09-15 00:28:27 +00:00
|
|
|
which are interpreted as if they had been specified on the command line before the actual command (so they can be overridden).
|
2018-10-30 05:04:25 +00:00
|
|
|
Node.js will exit with an error if an option that is not allowed in the environment is used, such as
|
2018-02-03 13:16:50 +00:00
|
|
|
.Fl -print
|
|
|
|
or a script file.
|
|
|
|
.
|
|
|
|
.It Ev NODE_PATH Ar directories...
|
|
|
|
A colon-separated list of
|
|
|
|
.Ar directories
|
|
|
|
prefixed to the module search path.
|
|
|
|
.
|
|
|
|
.It Ev NODE_PENDING_DEPRECATION
|
|
|
|
When set to
|
|
|
|
.Ar 1 ,
|
|
|
|
emit pending deprecation warnings.
|
|
|
|
.
|
2018-11-15 21:33:23 +00:00
|
|
|
.It Ev NODE_PRESERVE_SYMLINKS
|
|
|
|
When set to
|
|
|
|
.Ar 1 ,
|
|
|
|
the module loader preserves symbolic links when resolving and caching modules.
|
|
|
|
.
|
2018-04-08 06:33:19 +00:00
|
|
|
.It Ev NODE_REDIRECT_WARNINGS Ar file
|
|
|
|
Write process warnings to the given
|
|
|
|
.Ar file
|
|
|
|
instead of printing to stderr.
|
|
|
|
Equivalent to passing
|
|
|
|
.Fl -redirect-warnings Ar file
|
2020-09-15 00:28:27 +00:00
|
|
|
on the command line.
|
2022-06-19 12:40:52 +00:00
|
|
|
.
|
2018-02-03 13:16:50 +00:00
|
|
|
.It Ev NODE_REPL_HISTORY Ar file
|
|
|
|
Path to the
|
|
|
|
.Ar file
|
|
|
|
used to store persistent REPL history.
|
|
|
|
The default path is
|
|
|
|
.Sy ~/.node_repl_history ,
|
|
|
|
which is overridden by this variable.
|
|
|
|
Setting the value to an empty string ("" or " ") will disable persistent REPL history.
|
|
|
|
.
|
2022-06-19 12:40:52 +00:00
|
|
|
.It Ev NODE_REPL_EXTERNAL_MODULE Ar file
|
|
|
|
Path to a Node.js module which will be loaded in place of the built-in REPL.
|
|
|
|
Overriding this value to an empty string (`''`) will use the built-in REPL.
|
|
|
|
.
|
2020-04-30 19:19:52 +00:00
|
|
|
.It Ev NODE_SKIP_PLATFORM_CHECK
|
|
|
|
When set to
|
|
|
|
.Ar 1 ,
|
|
|
|
the check for a supported platform is skipped during Node.js startup.
|
|
|
|
Node.js might not execute correctly.
|
|
|
|
Any issues encountered on unsupported platforms will not be fixed.
|
|
|
|
.
|
2018-11-15 21:33:23 +00:00
|
|
|
.It Ev NODE_TLS_REJECT_UNAUTHORIZED
|
|
|
|
When set to
|
|
|
|
.Ar 0 ,
|
|
|
|
TLS certificate validation is disabled.
|
|
|
|
.
|
|
|
|
.It Ev NODE_V8_COVERAGE Ar dir
|
|
|
|
When set, Node.js writes JavaScript code coverage information to
|
|
|
|
.Ar dir .
|
|
|
|
.
|
2018-02-03 13:16:50 +00:00
|
|
|
.It Ev OPENSSL_CONF Ar file
|
|
|
|
Load an OpenSSL configuration file on startup.
|
|
|
|
Among other uses, this can be used to enable FIPS-compliant crypto if Node.js is built with
|
|
|
|
.Sy ./configure --openssl-fips .
|
|
|
|
.Pp
|
2017-01-25 22:13:34 +00:00
|
|
|
If the
|
2018-02-03 13:16:50 +00:00
|
|
|
.Fl -openssl-config
|
|
|
|
command-line option is used, this environment variable is ignored.
|
|
|
|
.
|
|
|
|
.It Ev SSL_CERT_DIR Ar dir
|
|
|
|
If
|
|
|
|
.Fl -use-openssl-ca
|
|
|
|
is enabled, this overrides and sets OpenSSL's directory containing trusted certificates.
|
|
|
|
.
|
|
|
|
.It Ev SSL_CERT_FILE Ar file
|
|
|
|
If
|
|
|
|
.Fl -use-openssl-ca
|
|
|
|
is enabled, this overrides and sets OpenSSL's file containing trusted certificates.
|
|
|
|
.
|
2022-06-19 12:40:52 +00:00
|
|
|
.It Ev TZ
|
|
|
|
Specify the timezone configuration.
|
|
|
|
.
|
2018-11-15 21:33:23 +00:00
|
|
|
.It Ev UV_THREADPOOL_SIZE Ar size
|
|
|
|
Sets the number of threads used in libuv's threadpool to
|
|
|
|
.Ar size .
|
|
|
|
.
|
|
|
|
.El
|
2018-02-03 13:16:50 +00:00
|
|
|
.\"=====================================================================
|
|
|
|
.Sh BUGS
|
2016-10-08 07:51:28 +00:00
|
|
|
Bugs are tracked in GitHub Issues:
|
2018-02-03 13:16:50 +00:00
|
|
|
.Sy https://github.com/nodejs/node/issues
|
|
|
|
.
|
|
|
|
.\"======================================================================
|
|
|
|
.Sh COPYRIGHT
|
|
|
|
Copyright Node.js contributors.
|
|
|
|
Node.js is available under the MIT license.
|
|
|
|
.
|
|
|
|
.Pp
|
|
|
|
Node.js also includes external libraries that are available under a variety of licenses.
|
|
|
|
See
|
2021-05-03 09:15:35 +00:00
|
|
|
.Sy https://github.com/nodejs/node/blob/HEAD/LICENSE
|
2016-10-08 07:51:28 +00:00
|
|
|
for the full license text.
|
2018-02-03 13:16:50 +00:00
|
|
|
.
|
|
|
|
.\"======================================================================
|
|
|
|
.Sh SEE ALSO
|
2016-07-21 12:12:16 +00:00
|
|
|
Website:
|
2018-02-03 13:16:50 +00:00
|
|
|
.Sy https://nodejs.org/
|
|
|
|
.
|
|
|
|
.Pp
|
2016-07-21 12:12:16 +00:00
|
|
|
Documentation:
|
2018-02-03 13:16:50 +00:00
|
|
|
.Sy https://nodejs.org/api/
|
|
|
|
.
|
|
|
|
.Pp
|
2021-07-10 18:57:57 +00:00
|
|
|
GitHub repository and issue tracker:
|
2018-02-03 13:16:50 +00:00
|
|
|
.Sy https://github.com/nodejs/node
|