{
    "mode": "man",
    "parameter": "NODE",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/NODE/1/json",
    "generated": "2026-09-01T14:22:13Z",
    "synopsis": "node [options] [v8-options] [-e string | script.js | -] [--] [arguments ...]\nnode inspect [-e string | script.js | - | <host>:<port>] ...\nnode [--v8-options]",
    "sections": {
        "NAME": {
            "content": "node — server-side JavaScript runtime\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "node [options] [v8-options] [-e string | script.js | -] [--] [arguments ...]\nnode inspect [-e string | script.js | - | <host>:<port>] ...\nnode [--v8-options]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Node.js  is  a  set  of  libraries  for  JavaScript which allows it to be used outside of the\nbrowser.  It is primarily focused on  creating  simple,  easy-to-build  network  clients  and\nservers.\n\nExecute node without arguments to start a REPL.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "-       Alias for stdin, analogous to the use of - in other command-line utilities.  The exe‐\ncuted script is read from stdin, and remaining arguments are passed to the script.\n\n--      Indicate  the  end  of  command-line  options.  Pass the rest of the arguments to the\nscript.\n\nIf no script filename or eval/print script is supplied prior to this, then  the  next\nargument will be used as a script filename.\n",
            "subsections": [
                {
                    "name": "--abort-on-uncaught-exception",
                    "content": "Aborting instead of exiting causes a core file to be generated for analysis.\n",
                    "long": "--abort-on-uncaught-exception"
                },
                {
                    "name": "--completion-bash",
                    "content": "Print source-able bash completion script for Node.js.\n",
                    "long": "--completion-bash"
                },
                {
                    "name": "-C --conditions _",
                    "content": "Use custom conditional exports conditions.  string\n",
                    "flag": "-C",
                    "long": "--conditions"
                },
                {
                    "name": "--cpu-prof",
                    "content": "Start the V8 CPU profiler on start up, and write the CPU profile to disk before exit.\nIf  --cpu-prof-dir is not specified, the profile will be written to the current work‐\ning directory with a generated file name.\n",
                    "long": "--cpu-prof"
                },
                {
                    "name": "--cpu-prof-dir",
                    "content": "The directory where the CPU profiles generated by --cpu-prof will be placed.  The de‐\nfault value is controlled by the --diagnostic-dir.  command-line option.\n",
                    "long": "--cpu-prof-dir"
                },
                {
                    "name": "--cpu-prof-interval",
                    "content": "The sampling interval in microseconds for the CPU profiles generated  by  --cpu-prof.\nThe default is 1000.\n",
                    "long": "--cpu-prof-interval"
                },
                {
                    "name": "--cpu-prof-name",
                    "content": "File name of the V8 CPU profile generated with --cpu-prof.\n",
                    "long": "--cpu-prof-name"
                },
                {
                    "name": "--diagnostic-dir",
                    "content": "Set the directory for all diagnostic output files.  Default is current working direc‐\ntory.   Set  the  directory  to which all diagnostic output files will be written to.\nDefaults to current working directory.  Affects  the  default  output  directory  of:\n--cpu-prof-dir.  --heap-prof-dir.  --redirect-warnings.\n\n--disable-proto=mode\nDisable  the `Object.prototype.proto` property. If mode is `delete`, the property\nwill be removed entirely. If mode is `throw`, accesses to the property will throw  an\nexception with the code `ERRPROTOACCESS`.\n",
                    "long": "--diagnostic-dir"
                },
                {
                    "name": "--disallow-code-generation-from-strings",
                    "content": "Make  built-in  language  features  like `eval` and `new Function` that generate code\nfrom strings throw an exception instead. This does not affect the Node.js  `vm`  mod‐\nule.\n",
                    "long": "--disallow-code-generation-from-strings"
                },
                {
                    "name": "--enable-fips",
                    "content": "Enable  FIPS-compliant  crypto  at  startup.   Requires  Node.js  to  be  built  with\n./configure --openssl-fips.\n",
                    "long": "--enable-fips"
                },
                {
                    "name": "--enable-source-maps",
                    "content": "Enable Source Map V3 support for stack traces.\n\n--experimental-default-type=type\nInterpret as either ES modules or CommonJS modules input via --eval  or  STDIN,  when\n--input-type is unspecified;\n",
                    "long": "--enable-source-maps"
                },
                {
                    "name": "--experimental-global-customevent",
                    "content": "Expose the CustomEvent on the global scope.\n",
                    "long": "--experimental-global-customevent"
                },
                {
                    "name": "--experimental-global-webcrypto",
                    "content": "Expose the Web Crypto API on the global scope.\n",
                    "long": "--experimental-global-webcrypto"
                },
                {
                    "name": "--experimental-import-meta-resolve",
                    "content": "Enable experimental ES modules support for import.meta.resolve().\n\n--experimental-loader=module\nSpecify the module to use as a custom module loader.\n",
                    "long": "--experimental-import-meta-resolve"
                },
                {
                    "name": "--experimental-network-imports",
                    "content": "Enable experimental support for loading modules using `import` over `https:`.\n",
                    "long": "--experimental-network-imports"
                },
                {
                    "name": "--experimental-policy",
                    "content": "Use the specified file as a security policy.\n",
                    "long": "--experimental-policy"
                },
                {
                    "name": "--experimental-shadow-realm",
                    "content": "Use this flag to enable ShadowRealm support.\n",
                    "long": "--experimental-shadow-realm"
                },
                {
                    "name": "--experimental-test-coverage",
                    "content": "Enable code coverage in the test runner.\n",
                    "long": "--experimental-test-coverage"
                },
                {
                    "name": "--no-experimental-fetch",
                    "content": "Disable experimental support for the Fetch API.\n",
                    "long": "--no-experimental-fetch"
                },
                {
                    "name": "--no-experimental-repl-await",
                    "content": "Disable top-level await keyword support in REPL.\n",
                    "long": "--no-experimental-repl-await"
                },
                {
                    "name": "--experimental-specifier-resolution",
                    "content": "Select  extension resolution algorithm for ES Modules; either 'explicit' (default) or\n'node'.\n",
                    "long": "--experimental-specifier-resolution"
                },
                {
                    "name": "--experimental-vm-modules",
                    "content": "Enable experimental ES module support in VM module.\n",
                    "long": "--experimental-vm-modules"
                },
                {
                    "name": "--experimental-wasi-unstable-preview1",
                    "content": "Enable experimental WebAssembly System Interface support. This flag is no longer  re‐\nquired as WASI is enabled by default.\n",
                    "long": "--experimental-wasi-unstable-preview1"
                },
                {
                    "name": "--experimental-wasm-modules",
                    "content": "Enable experimental WebAssembly module support.\n",
                    "long": "--experimental-wasm-modules"
                },
                {
                    "name": "--force-context-aware",
                    "content": "Disable loading native addons that are not context-aware.\n",
                    "long": "--force-context-aware"
                },
                {
                    "name": "--force-fips",
                    "content": "Force  FIPS-compliant  crypto on startup (Cannot be disabled from script code).  Same\nrequirements as --enable-fips.\n",
                    "long": "--force-fips"
                },
                {
                    "name": "--frozen-intrinsics",
                    "content": "Enable experimental frozen intrinsics support.\n\n--heapsnapshot-near-heap-limit=maxcount\nGenerate heap snapshot when the V8 heap usage is approaching the heap limit.  No more\nthan the specified number of snapshots will be generated.\n\n--heapsnapshot-signal=signal\nGenerate heap snapshot on specified signal.\n",
                    "long": "--frozen-intrinsics"
                },
                {
                    "name": "--heap-prof",
                    "content": "Start the V8 heap profiler on start up, and write the heap  profile  to  disk  before\nexit. If --heap-prof-dir is not specified, the profile will be written to the current\nworking directory with a generated file name.\n",
                    "long": "--heap-prof"
                },
                {
                    "name": "--heap-prof-dir",
                    "content": "The  directory  where the heap profiles generated by --heap-prof will be placed.  The\ndefault value is controlled by the --diagnostic-dir.  command-line option.\n",
                    "long": "--heap-prof-dir"
                },
                {
                    "name": "--heap-prof-interval",
                    "content": "The  average  sampling  interval  in  bytes  for  the  heap  profiles  generated   by\n--heap-prof.  The default is 512 * 1024.\n",
                    "long": "--heap-prof-interval"
                },
                {
                    "name": "--heap-prof-name",
                    "content": "File name of the V8 heap profile generated with --heap-prof.\n\n--icu-data-dir=file\nSpecify ICU data load path.  Overrides NODEICUDATA.\n\n--input-type=type\nSet the module resolution type for input via --eval, --print or STDIN.\n\n--inspect-brk=[host:]port\nActivate inspector on host:port and break at start of user script.\n\n--inspect-port=[host:]port\nSet the host:port to be used when the inspector is activated.\n",
                    "long": "--heap-prof-name"
                },
                {
                    "name": "--inspect-publish-uid=stderr,http",
                    "content": "Specify  how  the  inspector  WebSocket  URL is exposed.  Valid values are stderr and\nhttp.  Default is stderr,http.\n\n--inspect=[host:]port\nActivate inspector on host:port.  Default is 127.0.0.1:9229.\n\nV8 Inspector integration allows attaching Chrome DevTools and  IDEs  to  Node.js  in‐\nstances for debugging and profiling.  It uses the Chrome DevTools Protocol.\n",
                    "long": "--inspect-publish-uid",
                    "arg": "stderr,http"
                },
                {
                    "name": "--insecure-http-parser",
                    "content": "Use  an insecure HTTP parser that accepts invalid HTTP headers. This may allow inter‐\noperability with non-conformant HTTP implementations. It may also allow request smug‐\ngling and other HTTP attacks that rely on invalid headers being accepted. Avoid using\nthis option.\n",
                    "long": "--insecure-http-parser"
                },
                {
                    "name": "--jitless",
                    "content": "Disable runtime allocation of executable memory. This may be required on  some  plat‐\nforms for security reasons. It can also reduce attack surface on other platforms, but\nthe performance impact may be severe.\n\nThis flag is inherited from V8 and is subject to change upstream. It may disappear in\na non-semver-major release.\n\n--max-http-header-size=size\nSpecify the maximum size of HTTP headers in bytes. Defaults to 16 KiB.\n",
                    "long": "--jitless"
                },
                {
                    "name": "--napi-modules",
                    "content": "This option is a no-op.  It is kept for compatibility.\n",
                    "long": "--napi-modules"
                },
                {
                    "name": "--no-deprecation",
                    "content": "Silence deprecation warnings.\n",
                    "long": "--no-deprecation"
                },
                {
                    "name": "--no-extra-info-on-fatal-exception",
                    "content": "Hide extra information on fatal exception that causes exit.\n",
                    "long": "--no-extra-info-on-fatal-exception"
                },
                {
                    "name": "--no-force-async-hooks-checks",
                    "content": "Disable  runtime  checks  for `asynchooks`.  These will still be enabled dynamically\nwhen `asynchooks` is enabled.\n",
                    "long": "--no-force-async-hooks-checks"
                },
                {
                    "name": "--no-addons",
                    "content": "Disable the `node-addons` exports condition as well as disable loading native addons.\nWhen `--no-addons` is specified, calling `process.dlopen` or requiring a  native  C++\naddon will fail and throw an exception.\n",
                    "long": "--no-addons"
                },
                {
                    "name": "--no-global-search-paths",
                    "content": "Do not search modules from global paths.\n",
                    "long": "--no-global-search-paths"
                },
                {
                    "name": "--no-warnings",
                    "content": "Silence all process warnings (including deprecations).\n",
                    "long": "--no-warnings"
                },
                {
                    "name": "--node-memory-debug",
                    "content": "Enable extra debug checks for memory leaks in Node.js internals. This is usually only\nuseful for developers debugging Node.js itself.\n\n--openssl-config=file\nLoad an OpenSSL configuration file on startup.  Among other uses, this can be used to\nenable FIPS-compliant crypto if Node.js is built with ./configure --openssl-fips.\n",
                    "long": "--node-memory-debug"
                },
                {
                    "name": "--pending-deprecation",
                    "content": "Emit pending deprecation warnings.\n\n--policy-integrity=sri\nInstructs  Node.js to error prior to running any code if the policy does not have the\nspecified integrity. It expects a Subresource Integrity string as a parameter.\n",
                    "long": "--pending-deprecation"
                },
                {
                    "name": "--preserve-symlinks",
                    "content": "Instructs the module loader to preserve symbolic links  when  resolving  and  caching\nmodules other than the main module.\n",
                    "long": "--preserve-symlinks"
                },
                {
                    "name": "--preserve-symlinks-main",
                    "content": "Instructs the module loader to preserve symbolic links when resolving and caching the\nmain module.\n\n--prof  Generate V8 profiler output.\n",
                    "long": "--preserve-symlinks-main"
                },
                {
                    "name": "--prof-process",
                    "content": "Process V8 profiler output generated using the V8 option --prof.\n\n--redirect-warnings=file\nWrite process warnings to the given file instead of printing to stderr.\n",
                    "long": "--prof-process"
                },
                {
                    "name": "--report-compact",
                    "content": "Write diagnostic reports in a compact format, single-line JSON.\n",
                    "long": "--report-compact"
                },
                {
                    "name": "--report-dir --report-directory",
                    "content": "Location at which the diagnostic report will be generated.  The `file` name may be an\nabsolute  path.  If  it  is  not, the default directory it will be written to is con‐\ntrolled by the --diagnostic-dir.  command-line option.\n",
                    "long": "--report-directory"
                },
                {
                    "name": "--report-filename",
                    "content": "Name of the file to which the diagnostic report will be written.\n",
                    "long": "--report-filename"
                },
                {
                    "name": "--report-on-fatalerror",
                    "content": "Enables the diagnostic report to be triggered on fatal errors (internal errors within\nthe Node.js runtime such as out of memory) that leads to termination of the  applica‐\ntion.  Useful  to inspect various diagnostic data elements such as heap, stack, event\nloop state, resource consumption etc. to reason about the fatal error.\n",
                    "long": "--report-on-fatalerror"
                },
                {
                    "name": "--report-on-signal",
                    "content": "Enables diagnostic report to be generated upon receiving  the  specified  (or  prede‐\nfined) signal to the running Node.js process. Default signal is SIGUSR2.\n",
                    "long": "--report-on-signal"
                },
                {
                    "name": "--report-signal",
                    "content": "Sets  or  resets  the  signal for diagnostic report generation (not supported on Win‐\ndows). Default signal is SIGUSR2.\n",
                    "long": "--report-signal"
                },
                {
                    "name": "--report-uncaught-exception",
                    "content": "Enables diagnostic report to be generated on un-caught exceptions.  Useful  when  in‐\nspecting JavaScript stack in conjunction with native stack and other runtime environ‐\nment data.\n\n--secure-heap=n\nSpecify  the  size of the OpenSSL secure heap. Any value less than 2 disables the se‐\ncure heap. The default is 0. The value must be a power of two.\n\n--secure-heap-min=n\nSpecify the minimum allocation from the OpenSSL secure heap. The default  is  2.  The\nvalue must be a power of two.\n\n--test  Starts the Node.js command line test runner.\n",
                    "long": "--report-uncaught-exception"
                },
                {
                    "name": "--test-concurrency",
                    "content": "The maximum number of test files that the test runner CLI will execute concurrently.\n",
                    "long": "--test-concurrency"
                },
                {
                    "name": "--test-name-pattern",
                    "content": "A regular expression that configures the test runner to only execute tests whose name\nmatches the provided pattern.\n",
                    "long": "--test-name-pattern"
                },
                {
                    "name": "--test-reporter",
                    "content": "A test reporter to use when running tests.\n",
                    "long": "--test-reporter"
                },
                {
                    "name": "--test-reporter-destination",
                    "content": "The destination for the corresponding test reporter.\n",
                    "long": "--test-reporter-destination"
                },
                {
                    "name": "--test-only",
                    "content": "Configures  the  test runner to only execute top level tests that have the `only` op‐\ntion set.\n",
                    "long": "--test-only"
                },
                {
                    "name": "--test-shard",
                    "content": "Test suite shard to execute in a format of <index>/<total>.\n",
                    "long": "--test-shard"
                },
                {
                    "name": "--throw-deprecation",
                    "content": "Throw errors for deprecations.\n\n--title=title\nSpecify process.title on startup.\n\n--tls-cipher-list=list\nSpecify an alternative default TLS cipher list.  Requires Node.js to  be  built  with\ncrypto support. (Default)\n\n--tls-keylog=file\nLog  TLS  key material to a file. The key material is in NSS SSLKEYLOGFILE format and\ncan be used by software (such as Wireshark) to decrypt the TLS traffic.\n",
                    "long": "--throw-deprecation"
                },
                {
                    "name": "--tls-max-v1.2",
                    "content": "Set default  maxVersion to 'TLSv1.2'. Use to disable support for TLSv1.3.\n",
                    "long": "--tls-max-v1.2"
                },
                {
                    "name": "--tls-max-v1.3",
                    "content": "Set default  maxVersion to 'TLSv1.3'. Use to enable support for TLSv1.3.\n",
                    "long": "--tls-max-v1.3"
                },
                {
                    "name": "--tls-min-v1.0",
                    "content": "Set default minVersion to 'TLSv1'. Use for compatibility  with  old  TLS  clients  or\nservers.\n",
                    "long": "--tls-min-v1.0"
                },
                {
                    "name": "--tls-min-v1.1",
                    "content": "Set  default  minVersion  to 'TLSv1.1'. Use for compatibility with old TLS clients or\nservers.\n",
                    "long": "--tls-min-v1.1"
                },
                {
                    "name": "--tls-min-v1.2",
                    "content": "Set default minVersion to 'TLSv1.2'. This is the default for 12.x and later, but  the\noption is supported for compatibility with older Node.js versions.\n",
                    "long": "--tls-min-v1.2"
                },
                {
                    "name": "--tls-min-v1.3",
                    "content": "Set  default minVersion to 'TLSv1.3'. Use to disable support for TLSv1.2 in favour of\nTLSv1.3, which is more secure.\n",
                    "long": "--tls-min-v1.3"
                },
                {
                    "name": "--trace-atomics-wait",
                    "content": "Print short summaries of calls to Atomics.wait().  This flag is deprecated.\n",
                    "long": "--trace-atomics-wait"
                },
                {
                    "name": "--trace-deprecation",
                    "content": "Print stack traces for deprecations.\n\n--trace-event-categories categories\nA comma-separated list of categories that should be traced when trace  event  tracing\nis enabled using --trace-events-enabled.\n\n--trace-event-file-pattern pattern\nTemplate  string  specifying  the  filepath  for  the  trace  event data, it supports\n${rotation} and ${pid}.\n",
                    "long": "--trace-deprecation"
                },
                {
                    "name": "--trace-events-enabled",
                    "content": "Enable the collection of trace event tracing information.\n",
                    "long": "--trace-events-enabled"
                },
                {
                    "name": "--trace-exit",
                    "content": "Prints a stack trace whenever an environment is  exited  proactively,  i.e.  invoking\n`process.exit()`.\n",
                    "long": "--trace-exit"
                },
                {
                    "name": "--trace-sigint",
                    "content": "Prints a stack trace on SIGINT.\n",
                    "long": "--trace-sigint"
                },
                {
                    "name": "--trace-sync-io",
                    "content": "Print  a stack trace whenever synchronous I/O is detected after the first turn of the\nevent loop.\n",
                    "long": "--trace-sync-io"
                },
                {
                    "name": "--trace-tls",
                    "content": "Prints TLS packet trace information to stderr.\n",
                    "long": "--trace-tls"
                },
                {
                    "name": "--trace-uncaught",
                    "content": "Print stack traces for uncaught exceptions; usually, the stack trace associated  with\nthe  creation of an Error is printed, whereas this makes Node.js also print the stack\ntrace associated with throwing the value (which does not need  to  be  an  Error  in‐\nstance).\n\nEnabling this option may affect garbage collection behavior negatively.\n",
                    "long": "--trace-uncaught"
                },
                {
                    "name": "--trace-warnings",
                    "content": "Print stack traces for process warnings (including deprecations).\n",
                    "long": "--trace-warnings"
                },
                {
                    "name": "--track-heap-objects",
                    "content": "Track heap object allocations for heap snapshots.\n",
                    "long": "--track-heap-objects"
                },
                {
                    "name": "--unhandled-rejections=mode",
                    "content": "Define  the  behavior  for unhandled rejections. Can be one of `strict` (raise an er‐\nror), `warn` (enforce warnings) or `none` (silence warnings).\n\n--use-bundled-ca, --use-openssl-ca\nUse bundled Mozilla CA store as supplied by current Node.js version or use  OpenSSL's\ndefault CA store.  The default store is selectable at build-time.\n\nThe  bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store that\nis fixed at release time.  It is identical on all supported platforms.\n\nUsing OpenSSL store allows for external modifications of the store.  For  most  Linux\nand  BSD  distributions, this store is maintained by the distribution maintainers and\nsystem administrators.  OpenSSL CA store location is dependent  on  configuration  of\nthe OpenSSL library but this can be altered at runtime using environment variables.\n\nSee SSLCERTDIR and SSLCERTFILE.\n\n--use-largepages=mode\nRe-map  the Node.js static code to large memory pages at startup. If supported on the\ntarget system, this will cause the Node.js static code to be moved onto 2  MiB  pages\ninstead of 4 KiB pages.\n\nmode  must have one of the following values: `off` (the default value, meaning do not\nmap), `on` (map and ignore failure, reporting it to stderr),  or  `silent`  (map  and\nsilently ignore failure).\n",
                    "long": "--unhandled-rejections",
                    "arg": "mode"
                },
                {
                    "name": "--v8-options",
                    "content": "Print V8 command-line options.\n\n--v8-pool-size=num\nSet  V8's thread pool size which will be used to allocate background jobs.  If set to\n0 then V8 will choose an appropriate size of the thread pool based on the  number  of\nonline  processors.   If  the  value  provided  is larger than V8's maximum, then the\nlargest value will be chosen.\n",
                    "long": "--v8-options"
                },
                {
                    "name": "--zero-fill-buffers",
                    "content": "Automatically zero-fills all newly allocated Buffer and SlowBuffer instances.\n",
                    "long": "--zero-fill-buffers"
                },
                {
                    "name": "-c --check",
                    "content": "Check the script's syntax without executing it.  Exits with an error code  if  script\nis invalid.\n",
                    "flag": "-c",
                    "long": "--check"
                },
                {
                    "name": "-e --eval _",
                    "content": "Evaluate string as JavaScript.\n",
                    "flag": "-e",
                    "long": "--eval"
                },
                {
                    "name": "-h --help",
                    "content": "Print  command-line  options.   The  output of this option is less detailed than this\ndocument.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-i --interactive",
                    "content": "Open the REPL even if stdin does not appear to be a terminal.\n",
                    "flag": "-i",
                    "long": "--interactive"
                },
                {
                    "name": "-p --print _",
                    "content": "Identical to -e, but prints the result.\n",
                    "flag": "-p",
                    "long": "--print"
                },
                {
                    "name": "-r --require _",
                    "content": "Preload the specified module at startup.   Follows  `require()`'s  module  resolution\nrules.  module may be either a path to a file, or a Node.js module name.\n",
                    "flag": "-r",
                    "long": "--require"
                },
                {
                    "name": "-v --version",
                    "content": "Print node's version.\n",
                    "flag": "-v",
                    "long": "--version"
                }
            ]
        },
        "ENVIRONMENT": {
            "content": "FORCECOLOR\nUsed to enable ANSI colorized output. The value may be one of: 1 , true , or an empty\nstring  to  indicate 16-color support, 2 to indicate 256-color support, or 3 to indi‐\ncate 16 million-color support. When used and set  to  a  supported  value,  both  the\nNOCOLOR  and  NODEDISABLECOLORS environment variables are ignored. Any other value\nwill result in colorized output being disabled.\n\nNOCOLOR\nAlias for NODEDISABLECOLORS\n\nNODEDEBUG modules...\nComma-separated list of core modules that should print debug information.\n\nNODEDEBUGNATIVE modules...\nComma-separated list of C++ core modules that should print debug information.\n\nNODEDISABLECOLORS\nWhen set to 1, colors will not be used in the REPL.\n\nNODEEXTRACACERTS file\nWhen set, the well-known “root” CAs (like VeriSign) will be extended with  the  extra\ncertificates in file.  The file should consist of one or more trusted certificates in\nPEM format.\n\nIf   file  is  missing  or  misformatted,  a  message  will  be  emitted  once  using\nprocess.emitWarning(), but any errors are otherwise ignored.\n\nThis environment variable is ignored when `node` runs as setuid  root  or  has  Linux\nfile capabilities set.\n\nThe NODEEXTRACACERTS environment variable is only read when the Node.js process is\nfirst  launched.  Changing the value at runtime using process.env.NODEEXTRACACERTS\nhas no effect on the current process.\n\nNODEICUDATA file\nData path for ICU (Intl object) data.  Will extend linked-in data when compiled  with\nsmall-icu support.\n\nNODENOWARNINGS\nWhen set to 1, process warnings are silenced.\n\nNODEOPTIONS options...\nA  space-separated list of command-line options, which are interpreted as if they had\nbeen specified on the command line before the actual command (so they can be overrid‐\nden).  Node.js will exit with an error if an option that is not allowed in the  envi‐\nronment is used, such as --print or a script file.\n\nNODEPATH directories...\nA colon-separated list of directories prefixed to the module search path.\n\nNODEPENDINGDEPRECATION\nWhen set to 1, emit pending deprecation warnings.\n\nNODEPRESERVESYMLINKS\nWhen  set to 1, the module loader preserves symbolic links when resolving and caching\nmodules.\n\nNODEREDIRECTWARNINGS file\nWrite process warnings to the given file instead of printing to  stderr.   Equivalent\nto passing --redirect-warnings file on the command line.\n\nNODEREPLHISTORY file\nPath  to  the  file  used  to  store  persistent  REPL  history.  The default path is\n~/.nodereplhistory, which is overridden by this variable.  Setting the value to  an\nempty string (\"\" or \" \") will disable persistent REPL history.\n\nNODEREPLEXTERNALMODULE file\nPath  to  a Node.js module which will be loaded in place of the built-in REPL.  Over‐\nriding this value to an empty string (`''`) will use the built-in REPL.\n\nNODESKIPPLATFORMCHECK\nWhen set to 1, the check for a supported platform is skipped during Node.js  startup.\nNode.js might not execute correctly.  Any issues encountered on unsupported platforms\nwill not be fixed.\n\nNODETLSREJECTUNAUTHORIZED\nWhen set to 0, TLS certificate validation is disabled.\n\nNODEV8COVERAGE dir\nWhen set, Node.js writes JavaScript code coverage information to dir.\n\nOPENSSLCONF file\nLoad an OpenSSL configuration file on startup.  Among other uses, this can be used to\nenable FIPS-compliant crypto if Node.js is built with ./configure --openssl-fips.\n\nIf the --openssl-config command-line option is used, this environment variable is ig‐\nnored.\n\nSSLCERTDIR dir\nIf  --use-openssl-ca is enabled, this overrides and sets OpenSSL's directory contain‐\ning trusted certificates.\n\nSSLCERTFILE file\nIf --use-openssl-ca is enabled, this overrides and  sets  OpenSSL's  file  containing\ntrusted certificates.\n\nTZ      Specify the timezone configuration.\n\nUVTHREADPOOLSIZE size\nSets the number of threads used in libuv's threadpool to size.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Bugs are tracked in GitHub Issues: https://github.com/nodejs/node/issues\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright Node.js contributors.  Node.js is available under the MIT license.\n\nNode.js also includes external libraries that are available under a variety of licenses.  See\nhttps://github.com/nodejs/node/blob/HEAD/LICENSE for the full license text.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Website: https://nodejs.org/\n\nDocumentation: https://nodejs.org/api/\n\nGitHub repository and issue tracker: https://github.com/nodejs/node\n\nIRC (general questions): libera.chat #node.js (unofficial)\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Written           and           maintained           by          1000+          contributors:",
            "subsections": [
                {
                    "name": "https://github.com/nodejs/node/blob/HEAD/AUTHORS",
                    "content": "2018                                         NODE(1)"
                }
            ]
        }
    },
    "summary": "node — server-side JavaScript runtime",
    "flags": [
        {
            "flag": "",
            "long": "--abort-on-uncaught-exception",
            "arg": null,
            "description": "Aborting instead of exiting causes a core file to be generated for analysis."
        },
        {
            "flag": "",
            "long": "--completion-bash",
            "arg": null,
            "description": "Print source-able bash completion script for Node.js."
        },
        {
            "flag": "-C",
            "long": "--conditions",
            "arg": null,
            "description": "Use custom conditional exports conditions. string"
        },
        {
            "flag": "",
            "long": "--cpu-prof",
            "arg": null,
            "description": "Start the V8 CPU profiler on start up, and write the CPU profile to disk before exit. If --cpu-prof-dir is not specified, the profile will be written to the current work‐ ing directory with a generated file name."
        },
        {
            "flag": "",
            "long": "--cpu-prof-dir",
            "arg": null,
            "description": "The directory where the CPU profiles generated by --cpu-prof will be placed. The de‐ fault value is controlled by the --diagnostic-dir. command-line option."
        },
        {
            "flag": "",
            "long": "--cpu-prof-interval",
            "arg": null,
            "description": "The sampling interval in microseconds for the CPU profiles generated by --cpu-prof. The default is 1000."
        },
        {
            "flag": "",
            "long": "--cpu-prof-name",
            "arg": null,
            "description": "File name of the V8 CPU profile generated with --cpu-prof."
        },
        {
            "flag": "",
            "long": "--diagnostic-dir",
            "arg": null,
            "description": "Set the directory for all diagnostic output files. Default is current working direc‐ tory. Set the directory to which all diagnostic output files will be written to. Defaults to current working directory. Affects the default output directory of: --cpu-prof-dir. --heap-prof-dir. --redirect-warnings. --disable-proto=mode Disable the `Object.prototype.proto` property. If mode is `delete`, the property will be removed entirely. If mode is `throw`, accesses to the property will throw an exception with the code `ERRPROTOACCESS`."
        },
        {
            "flag": "",
            "long": "--disallow-code-generation-from-strings",
            "arg": null,
            "description": "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` mod‐ ule."
        },
        {
            "flag": "",
            "long": "--enable-fips",
            "arg": null,
            "description": "Enable FIPS-compliant crypto at startup. Requires Node.js to be built with ./configure --openssl-fips."
        },
        {
            "flag": "",
            "long": "--enable-source-maps",
            "arg": null,
            "description": "Enable Source Map V3 support for stack traces. --experimental-default-type=type Interpret as either ES modules or CommonJS modules input via --eval or STDIN, when --input-type is unspecified;"
        },
        {
            "flag": "",
            "long": "--experimental-global-customevent",
            "arg": null,
            "description": "Expose the CustomEvent on the global scope."
        },
        {
            "flag": "",
            "long": "--experimental-global-webcrypto",
            "arg": null,
            "description": "Expose the Web Crypto API on the global scope."
        },
        {
            "flag": "",
            "long": "--experimental-import-meta-resolve",
            "arg": null,
            "description": "Enable experimental ES modules support for import.meta.resolve(). --experimental-loader=module Specify the module to use as a custom module loader."
        },
        {
            "flag": "",
            "long": "--experimental-network-imports",
            "arg": null,
            "description": "Enable experimental support for loading modules using `import` over `https:`."
        },
        {
            "flag": "",
            "long": "--experimental-policy",
            "arg": null,
            "description": "Use the specified file as a security policy."
        },
        {
            "flag": "",
            "long": "--experimental-shadow-realm",
            "arg": null,
            "description": "Use this flag to enable ShadowRealm support."
        },
        {
            "flag": "",
            "long": "--experimental-test-coverage",
            "arg": null,
            "description": "Enable code coverage in the test runner."
        },
        {
            "flag": "",
            "long": "--no-experimental-fetch",
            "arg": null,
            "description": "Disable experimental support for the Fetch API."
        },
        {
            "flag": "",
            "long": "--no-experimental-repl-await",
            "arg": null,
            "description": "Disable top-level await keyword support in REPL."
        },
        {
            "flag": "",
            "long": "--experimental-specifier-resolution",
            "arg": null,
            "description": "Select extension resolution algorithm for ES Modules; either 'explicit' (default) or 'node'."
        },
        {
            "flag": "",
            "long": "--experimental-vm-modules",
            "arg": null,
            "description": "Enable experimental ES module support in VM module."
        },
        {
            "flag": "",
            "long": "--experimental-wasi-unstable-preview1",
            "arg": null,
            "description": "Enable experimental WebAssembly System Interface support. This flag is no longer re‐ quired as WASI is enabled by default."
        },
        {
            "flag": "",
            "long": "--experimental-wasm-modules",
            "arg": null,
            "description": "Enable experimental WebAssembly module support."
        },
        {
            "flag": "",
            "long": "--force-context-aware",
            "arg": null,
            "description": "Disable loading native addons that are not context-aware."
        },
        {
            "flag": "",
            "long": "--force-fips",
            "arg": null,
            "description": "Force FIPS-compliant crypto on startup (Cannot be disabled from script code). Same requirements as --enable-fips."
        },
        {
            "flag": "",
            "long": "--frozen-intrinsics",
            "arg": null,
            "description": "Enable experimental frozen intrinsics support. --heapsnapshot-near-heap-limit=maxcount Generate heap snapshot when the V8 heap usage is approaching the heap limit. No more than the specified number of snapshots will be generated. --heapsnapshot-signal=signal Generate heap snapshot on specified signal."
        },
        {
            "flag": "",
            "long": "--heap-prof",
            "arg": null,
            "description": "Start the V8 heap profiler on start up, and write the heap profile to disk before exit. If --heap-prof-dir is not specified, the profile will be written to the current working directory with a generated file name."
        },
        {
            "flag": "",
            "long": "--heap-prof-dir",
            "arg": null,
            "description": "The directory where the heap profiles generated by --heap-prof will be placed. The default value is controlled by the --diagnostic-dir. command-line option."
        },
        {
            "flag": "",
            "long": "--heap-prof-interval",
            "arg": null,
            "description": "The average sampling interval in bytes for the heap profiles generated by --heap-prof. The default is 512 * 1024."
        },
        {
            "flag": "",
            "long": "--heap-prof-name",
            "arg": null,
            "description": "File name of the V8 heap profile generated with --heap-prof. --icu-data-dir=file Specify ICU data load path. Overrides NODEICUDATA. --input-type=type Set the module resolution type for input via --eval, --print or STDIN. --inspect-brk=[host:]port Activate inspector on host:port and break at start of user script. --inspect-port=[host:]port Set the host:port to be used when the inspector is activated."
        },
        {
            "flag": "",
            "long": "--inspect-publish-uid",
            "arg": "stderr,http",
            "description": "Specify how the inspector WebSocket URL is exposed. Valid values are stderr and http. Default is stderr,http. --inspect=[host:]port Activate inspector on host:port. Default is 127.0.0.1:9229. V8 Inspector integration allows attaching Chrome DevTools and IDEs to Node.js in‐ stances for debugging and profiling. It uses the Chrome DevTools Protocol."
        },
        {
            "flag": "",
            "long": "--insecure-http-parser",
            "arg": null,
            "description": "Use an insecure HTTP parser that accepts invalid HTTP headers. This may allow inter‐ operability with non-conformant HTTP implementations. It may also allow request smug‐ gling and other HTTP attacks that rely on invalid headers being accepted. Avoid using this option."
        },
        {
            "flag": "",
            "long": "--jitless",
            "arg": null,
            "description": "Disable runtime allocation of executable memory. This may be required on some plat‐ forms for security reasons. It can also reduce attack surface on other platforms, but the performance impact may be severe. This flag is inherited from V8 and is subject to change upstream. It may disappear in a non-semver-major release. --max-http-header-size=size Specify the maximum size of HTTP headers in bytes. Defaults to 16 KiB."
        },
        {
            "flag": "",
            "long": "--napi-modules",
            "arg": null,
            "description": "This option is a no-op. It is kept for compatibility."
        },
        {
            "flag": "",
            "long": "--no-deprecation",
            "arg": null,
            "description": "Silence deprecation warnings."
        },
        {
            "flag": "",
            "long": "--no-extra-info-on-fatal-exception",
            "arg": null,
            "description": "Hide extra information on fatal exception that causes exit."
        },
        {
            "flag": "",
            "long": "--no-force-async-hooks-checks",
            "arg": null,
            "description": "Disable runtime checks for `asynchooks`. These will still be enabled dynamically when `asynchooks` is enabled."
        },
        {
            "flag": "",
            "long": "--no-addons",
            "arg": null,
            "description": "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."
        },
        {
            "flag": "",
            "long": "--no-global-search-paths",
            "arg": null,
            "description": "Do not search modules from global paths."
        },
        {
            "flag": "",
            "long": "--no-warnings",
            "arg": null,
            "description": "Silence all process warnings (including deprecations)."
        },
        {
            "flag": "",
            "long": "--node-memory-debug",
            "arg": null,
            "description": "Enable extra debug checks for memory leaks in Node.js internals. This is usually only useful for developers debugging Node.js itself. --openssl-config=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 ./configure --openssl-fips."
        },
        {
            "flag": "",
            "long": "--pending-deprecation",
            "arg": null,
            "description": "Emit pending deprecation warnings. --policy-integrity=sri Instructs Node.js to error prior to running any code if the policy does not have the specified integrity. It expects a Subresource Integrity string as a parameter."
        },
        {
            "flag": "",
            "long": "--preserve-symlinks",
            "arg": null,
            "description": "Instructs the module loader to preserve symbolic links when resolving and caching modules other than the main module."
        },
        {
            "flag": "",
            "long": "--preserve-symlinks-main",
            "arg": null,
            "description": "Instructs the module loader to preserve symbolic links when resolving and caching the main module. --prof Generate V8 profiler output."
        },
        {
            "flag": "",
            "long": "--prof-process",
            "arg": null,
            "description": "Process V8 profiler output generated using the V8 option --prof. --redirect-warnings=file Write process warnings to the given file instead of printing to stderr."
        },
        {
            "flag": "",
            "long": "--report-compact",
            "arg": null,
            "description": "Write diagnostic reports in a compact format, single-line JSON."
        },
        {
            "flag": "",
            "long": "--report-directory",
            "arg": null,
            "description": "Location at which the diagnostic report will be generated. The `file` name may be an absolute path. If it is not, the default directory it will be written to is con‐ trolled by the --diagnostic-dir. command-line option."
        },
        {
            "flag": "",
            "long": "--report-filename",
            "arg": null,
            "description": "Name of the file to which the diagnostic report will be written."
        },
        {
            "flag": "",
            "long": "--report-on-fatalerror",
            "arg": null,
            "description": "Enables the diagnostic report to be triggered on fatal errors (internal errors within the Node.js runtime such as out of memory) that leads to termination of the applica‐ tion. Useful to inspect various diagnostic data elements such as heap, stack, event loop state, resource consumption etc. to reason about the fatal error."
        },
        {
            "flag": "",
            "long": "--report-on-signal",
            "arg": null,
            "description": "Enables diagnostic report to be generated upon receiving the specified (or prede‐ fined) signal to the running Node.js process. Default signal is SIGUSR2."
        },
        {
            "flag": "",
            "long": "--report-signal",
            "arg": null,
            "description": "Sets or resets the signal for diagnostic report generation (not supported on Win‐ dows). Default signal is SIGUSR2."
        },
        {
            "flag": "",
            "long": "--report-uncaught-exception",
            "arg": null,
            "description": "Enables diagnostic report to be generated on un-caught exceptions. Useful when in‐ specting JavaScript stack in conjunction with native stack and other runtime environ‐ ment data. --secure-heap=n Specify the size of the OpenSSL secure heap. Any value less than 2 disables the se‐ cure heap. The default is 0. The value must be a power of two. --secure-heap-min=n Specify the minimum allocation from the OpenSSL secure heap. The default is 2. The value must be a power of two. --test Starts the Node.js command line test runner."
        },
        {
            "flag": "",
            "long": "--test-concurrency",
            "arg": null,
            "description": "The maximum number of test files that the test runner CLI will execute concurrently."
        },
        {
            "flag": "",
            "long": "--test-name-pattern",
            "arg": null,
            "description": "A regular expression that configures the test runner to only execute tests whose name matches the provided pattern."
        },
        {
            "flag": "",
            "long": "--test-reporter",
            "arg": null,
            "description": "A test reporter to use when running tests."
        },
        {
            "flag": "",
            "long": "--test-reporter-destination",
            "arg": null,
            "description": "The destination for the corresponding test reporter."
        },
        {
            "flag": "",
            "long": "--test-only",
            "arg": null,
            "description": "Configures the test runner to only execute top level tests that have the `only` op‐ tion set."
        },
        {
            "flag": "",
            "long": "--test-shard",
            "arg": null,
            "description": "Test suite shard to execute in a format of <index>/<total>."
        },
        {
            "flag": "",
            "long": "--throw-deprecation",
            "arg": null,
            "description": "Throw errors for deprecations. --title=title Specify process.title on startup. --tls-cipher-list=list Specify an alternative default TLS cipher list. Requires Node.js to be built with crypto support. (Default) --tls-keylog=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."
        },
        {
            "flag": "",
            "long": "--tls-max-v1.2",
            "arg": null,
            "description": "Set default maxVersion to 'TLSv1.2'. Use to disable support for TLSv1.3."
        },
        {
            "flag": "",
            "long": "--tls-max-v1.3",
            "arg": null,
            "description": "Set default maxVersion to 'TLSv1.3'. Use to enable support for TLSv1.3."
        },
        {
            "flag": "",
            "long": "--tls-min-v1.0",
            "arg": null,
            "description": "Set default minVersion to 'TLSv1'. Use for compatibility with old TLS clients or servers."
        },
        {
            "flag": "",
            "long": "--tls-min-v1.1",
            "arg": null,
            "description": "Set default minVersion to 'TLSv1.1'. Use for compatibility with old TLS clients or servers."
        },
        {
            "flag": "",
            "long": "--tls-min-v1.2",
            "arg": null,
            "description": "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."
        },
        {
            "flag": "",
            "long": "--tls-min-v1.3",
            "arg": null,
            "description": "Set default minVersion to 'TLSv1.3'. Use to disable support for TLSv1.2 in favour of TLSv1.3, which is more secure."
        },
        {
            "flag": "",
            "long": "--trace-atomics-wait",
            "arg": null,
            "description": "Print short summaries of calls to Atomics.wait(). This flag is deprecated."
        },
        {
            "flag": "",
            "long": "--trace-deprecation",
            "arg": null,
            "description": "Print stack traces for deprecations. --trace-event-categories categories A comma-separated list of categories that should be traced when trace event tracing is enabled using --trace-events-enabled. --trace-event-file-pattern pattern Template string specifying the filepath for the trace event data, it supports ${rotation} and ${pid}."
        },
        {
            "flag": "",
            "long": "--trace-events-enabled",
            "arg": null,
            "description": "Enable the collection of trace event tracing information."
        },
        {
            "flag": "",
            "long": "--trace-exit",
            "arg": null,
            "description": "Prints a stack trace whenever an environment is exited proactively, i.e. invoking `process.exit()`."
        },
        {
            "flag": "",
            "long": "--trace-sigint",
            "arg": null,
            "description": "Prints a stack trace on SIGINT."
        },
        {
            "flag": "",
            "long": "--trace-sync-io",
            "arg": null,
            "description": "Print a stack trace whenever synchronous I/O is detected after the first turn of the event loop."
        },
        {
            "flag": "",
            "long": "--trace-tls",
            "arg": null,
            "description": "Prints TLS packet trace information to stderr."
        },
        {
            "flag": "",
            "long": "--trace-uncaught",
            "arg": null,
            "description": "Print stack traces for uncaught exceptions; usually, the stack trace associated with the creation of an 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 Error in‐ stance). Enabling this option may affect garbage collection behavior negatively."
        },
        {
            "flag": "",
            "long": "--trace-warnings",
            "arg": null,
            "description": "Print stack traces for process warnings (including deprecations)."
        },
        {
            "flag": "",
            "long": "--track-heap-objects",
            "arg": null,
            "description": "Track heap object allocations for heap snapshots."
        },
        {
            "flag": "",
            "long": "--unhandled-rejections",
            "arg": "mode",
            "description": "Define the behavior for unhandled rejections. Can be one of `strict` (raise an er‐ ror), `warn` (enforce warnings) or `none` (silence warnings). --use-bundled-ca, --use-openssl-ca 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. 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. 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. See SSLCERTDIR and SSLCERTFILE. --use-largepages=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. 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)."
        },
        {
            "flag": "",
            "long": "--v8-options",
            "arg": null,
            "description": "Print V8 command-line options. --v8-pool-size=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."
        },
        {
            "flag": "",
            "long": "--zero-fill-buffers",
            "arg": null,
            "description": "Automatically zero-fills all newly allocated Buffer and SlowBuffer instances."
        },
        {
            "flag": "-c",
            "long": "--check",
            "arg": null,
            "description": "Check the script's syntax without executing it. Exits with an error code if script is invalid."
        },
        {
            "flag": "-e",
            "long": "--eval",
            "arg": null,
            "description": "Evaluate string as JavaScript."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Print command-line options. The output of this option is less detailed than this document."
        },
        {
            "flag": "-i",
            "long": "--interactive",
            "arg": null,
            "description": "Open the REPL even if stdin does not appear to be a terminal."
        },
        {
            "flag": "-p",
            "long": "--print",
            "arg": null,
            "description": "Identical to -e, but prints the result."
        },
        {
            "flag": "-r",
            "long": "--require",
            "arg": null,
            "description": "Preload the specified module at startup. Follows `require()`'s module resolution rules. module may be either a path to a file, or a Node.js module name."
        },
        {
            "flag": "-v",
            "long": "--version",
            "arg": null,
            "description": "Print node's version."
        }
    ],
    "examples": [],
    "see_also": [],
    "tldr": {
        "source": "official",
        "description": "Server-side JavaScript platform (Node.js).",
        "examples": [
            {
                "description": "Run a JavaScript file",
                "command": "node {{path/to/file}}"
            },
            {
                "description": "Start a REPL (interactive shell)",
                "command": "node"
            },
            {
                "description": "Execute the specified file restarting the process when an imported file is changed (requires Node.js version 18.11+)",
                "command": "node --watch {{path/to/file}}"
            },
            {
                "description": "Evaluate JavaScript code by passing it as an argument",
                "command": "node {{-e|--eval}} \"{{code}}\""
            },
            {
                "description": "Evaluate and print the result, useful to print node's dependencies versions",
                "command": "node {{-p|--print}} \"process.versions\""
            },
            {
                "description": "Activate inspector, pausing execution until a debugger is connected once source code is fully parsed",
                "command": "node --no-lazy --inspect-brk {{path/to/file}}"
            }
        ]
    }
}