{"$schema":"https://doc-kit.nodejs.org/schemas/api-doc/1.0.0.json","id":"cli","path":"/cli","type":"misc","module":null,"title":"Command-line API","introducedIn":"v5.9.1","sourceLink":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Node.js comes with a variety of CLI options. These options expose built-in\ndebugging, multiple ways to execute scripts, and other helpful runtime options.\n\nTo view this documentation as a manual page in a terminal, run `man node`.","summary":"Node.js comes with a variety of CLI options. These options expose built-in debugging, multiple ways to execute scripts, and other helpful runtime options.","examples":[],"children":[{"kind":"section","id":"synopsis","name":"Synopsis","title":"Synopsis","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"`node [options] [V8 options] [<program-entry-point> | -e \"script\" | -] [--] [arguments]`\n\n`node inspect [<program-entry-point> | -e \"script\" | <host>:<port>] …`\n\n`node --v8-options`\n\nExecute without arguments to start the [REPL](repl.html).\n\nFor more info about `node inspect`, see the [debugger](debugger.html) documentation.","summary":"`node [options] [V8 options] [<program-entry-point> | -e \"script\" | -] [--] [arguments]`","examples":[],"children":[]},{"kind":"section","id":"program-entry-point","name":"Program entry point","title":"Program entry point","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The program entry point is a specifier-like string. If the string is not an\nabsolute path, it's resolved as a relative path from the current working\ndirectory. That entry point string is then resolved as if it's been requested\nby `require()` from the current working directory. If no corresponding file\nis found, an error is thrown.\n\nBy default, the resolved path is also loaded as if it's been requested by `require()`,\nunless one of the conditions below apply—then it's loaded as if it's been requested\nby `import()`:\n\n* The program was started with a command-line flag that forces the entry\n  point to be loaded with ECMAScript module loader, such as `--import`.\n* The file has an `.mjs`, `.mts` or `.wasm` extension.\n* The file does not have a `.cjs` extension, and the nearest parent\n  `package.json` file contains a top-level [`\"type\"`](packages.html#type) field with a value of\n  `\"module\"`.\n\nSee [module resolution and loading](packages.html#module-resolution-and-loading) for more details.","summary":"The program entry point is a specifier-like string. If the string is not an absolute path, it's resolved as a relative path from the current working directory. That entry point string is then resolved as if it's been requested by `require()` from the current working directory. If no corresponding file is found, an error is thrown.","examples":[],"children":[]},{"kind":"section","id":"options","name":"Options","title":"Options","scope":"module","overloadOf":null,"stability":{"index":"2","description":"Stable"},"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v10.12.0"],"prUrl":"https://github.com/nodejs/node/pull/23020","commit":null,"description":"Underscores instead of dashes are now allowed for Node.js options as well, in addition to V8 options."}],"description":"All options, including V8 options, allow words to be separated by both\ndashes (`-`) or underscores (`_`). For example, `--pending-deprecation` is\nequivalent to `--pending_deprecation`.\n\nIf an option that takes a single value (such as `--max-http-header-size`) is\npassed more than once, then the last passed value is used. Options from the\ncommand line take precedence over options passed through the [`NODE_OPTIONS`](#node_optionsoptions)\nenvironment variable.","summary":"All options, including V8 options, allow words to be separated by both dashes (`-`) or underscores (`_`). For example, `--pending-deprecation` is equivalent to `--pending_deprecation`.","examples":[],"children":[{"kind":"section","id":"-","name":"-","title":"`-`","scope":"module","overloadOf":null,"stability":null,"added":["v8.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Alias for stdin. Analogous to the use of `-` in other command-line utilities,\nmeaning that the script is read from stdin, and the rest of the options\nare passed to that script.","summary":"Alias for stdin. Analogous to the use of `-` in other command-line utilities, meaning that the script is read from stdin, and the rest of the options are passed to that script.","examples":[],"children":[]},{"kind":"section","id":"--","name":"--","title":"`--`","scope":"module","overloadOf":null,"stability":null,"added":["v6.11.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Indicate the end of node options. Pass the rest of the arguments to the script.\nIf no script filename or eval/print script is supplied prior to this, then\nthe next argument is used as a script filename.","summary":"Indicate the end of node options. Pass the rest of the arguments to the script. If no script filename or eval/print script is supplied prior to this, then the next argument is used as a script filename.","examples":[],"children":[]},{"kind":"section","id":"--abort-on-uncaught-exception","name":"--abort-on-uncaught-exception","title":"`--abort-on-uncaught-exception`","scope":"module","overloadOf":null,"stability":null,"added":["v0.10.8"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Aborting instead of exiting causes a core file to be generated for post-mortem\nanalysis using a debugger (such as `lldb`, `gdb`, and `mdb`).\n\nIf this flag is passed, the behavior can still be set to not abort through\n[`process.setUncaughtExceptionCaptureCallback()`](process.html#processsetuncaughtexceptioncapturecallbackfn) (and through usage of the\n`node:domain` module that uses it).","summary":"Aborting instead of exiting causes a core file to be generated for post-mortem analysis using a debugger (such as `lldb`, `gdb`, and `mdb`).","examples":[],"children":[]},{"kind":"section","id":"--allow-addons","name":"--allow-addons","title":"`--allow-addons`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":["v21.6.0","v20.12.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When using the [Permission Model](permissions.html#permission-model), the process will not be able to use\nnative addons by default.\nAttempts to do so will throw an `ERR_DLOPEN_DISABLED` unless the\nuser explicitly passes the `--allow-addons` flag when starting Node.js.\n\nExample:\n\n```cjs\n// Attempt to require an native addon\nrequire('nodejs-addon-example');\n```\n\n```console\n$ node --permission --allow-fs-read=* index.js\nnode:internal/modules/cjs/loader:1319\n  return process.dlopen(module, path.toNamespacedPath(filename));\n                 ^\n\nError: Cannot load native addon because loading addons is disabled.\n    at Module._extensions..node (node:internal/modules/cjs/loader:1319:18)\n    at Module.load (node:internal/modules/cjs/loader:1091:32)\n    at Module._load (node:internal/modules/cjs/loader:938:12)\n    at Module.require (node:internal/modules/cjs/loader:1115:19)\n    at require (node:internal/modules/helpers:130:18)\n    at Object.<anonymous> (/home/index.js:1:15)\n    at Module._compile (node:internal/modules/cjs/loader:1233:14)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)\n    at Module.load (node:internal/modules/cjs/loader:1091:32)\n    at Module._load (node:internal/modules/cjs/loader:938:12) {\n  code: 'ERR_DLOPEN_DISABLED'\n}\n```","summary":"When using the Permission Model, the process will not be able to use native addons by default. Attempts to do so will throw an `ERR_DLOPEN_DISABLED` unless the user explicitly passes the `--allow-addons` flag when starting Node.js.","examples":[{"language":"cjs","displayName":null,"code":"// Attempt to require an native addon\nrequire('nodejs-addon-example');"},{"language":"console","displayName":null,"code":"$ node --permission --allow-fs-read=* index.js\nnode:internal/modules/cjs/loader:1319\n  return process.dlopen(module, path.toNamespacedPath(filename));\n                 ^\n\nError: Cannot load native addon because loading addons is disabled.\n    at Module._extensions..node (node:internal/modules/cjs/loader:1319:18)\n    at Module.load (node:internal/modules/cjs/loader:1091:32)\n    at Module._load (node:internal/modules/cjs/loader:938:12)\n    at Module.require (node:internal/modules/cjs/loader:1115:19)\n    at require (node:internal/modules/helpers:130:18)\n    at Object.<anonymous> (/home/index.js:1:15)\n    at Module._compile (node:internal/modules/cjs/loader:1233:14)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)\n    at Module.load (node:internal/modules/cjs/loader:1091:32)\n    at Module._load (node:internal/modules/cjs/loader:938:12) {\n  code: 'ERR_DLOPEN_DISABLED'\n}"}],"children":[]},{"kind":"section","id":"--allow-child-process","name":"--allow-child-process","title":"`--allow-child-process`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":["v20.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.4.0","v22.18.0"],"prUrl":"https://github.com/nodejs/node/pull/58853","commit":null,"description":"When spawning process with the permission model enabled. The flags are inherit to the child Node.js process through NODE_OPTIONS environment variable."}],"description":"When using the [Permission Model](permissions.html#permission-model), the process will not be able to spawn any\nchild process by default.\nAttempts to do so will throw an `ERR_ACCESS_DENIED` unless the\nuser explicitly passes the `--allow-child-process` flag when starting Node.js.\n\nExample:\n\n```js\nconst childProcess = require('node:child_process');\n// Attempt to bypass the permission\nchildProcess.spawn('node', ['-e', 'require(\"fs\").writeFileSync(\"/new-file\", \"example\")']);\n```\n\n```console\n$ node --permission --allow-fs-read=* index.js\nnode:internal/child_process:388\n  const err = this._handle.spawn(options);\n                           ^\nError: Access to this API has been restricted\n    at ChildProcess.spawn (node:internal/child_process:388:28)\n    at node:internal/main/run_main_module:17:47 {\n  code: 'ERR_ACCESS_DENIED',\n  permission: 'ChildProcess'\n}\n```\n\nThe `child_process.fork()` API inherits the execution arguments from the\nparent process. This means that if Node.js is started with the Permission\nModel enabled and the `--allow-child-process` flag is set, any child process\ncreated using `child_process.fork()` will automatically receive all relevant\nPermission Model flags.\n\nThis behavior also applies to `child_process.spawn()`, but in that case, the\nflags are propagated via the `NODE_OPTIONS` environment variable rather than\ndirectly through the process arguments.","summary":"When using the Permission Model, the process will not be able to spawn any child process by default. Attempts to do so will throw an `ERR_ACCESS_DENIED` unless the user explicitly passes the `--allow-child-process` flag when starting Node.js.","examples":[{"language":"js","displayName":null,"code":"const childProcess = require('node:child_process');\n// Attempt to bypass the permission\nchildProcess.spawn('node', ['-e', 'require(\"fs\").writeFileSync(\"/new-file\", \"example\")']);"},{"language":"console","displayName":null,"code":"$ node --permission --allow-fs-read=* index.js\nnode:internal/child_process:388\n  const err = this._handle.spawn(options);\n                           ^\nError: Access to this API has been restricted\n    at ChildProcess.spawn (node:internal/child_process:388:28)\n    at node:internal/main/run_main_module:17:47 {\n  code: 'ERR_ACCESS_DENIED',\n  permission: 'ChildProcess'\n}"}],"children":[]},{"kind":"section","id":"--allow-ffi","name":"--allow-ffi","title":"`--allow-ffi`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":["v26.1.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When using the [Permission Model](permissions.html#permission-model), the process will not be able to use FFI\nAPIs by default. Attempts to use FFI APIs will throw an `ERR_ACCESS_DENIED`\nexception unless the user explicitly passes the `--allow-ffi` flag when\nstarting Node.js. The [`node:ffi`](ffi.html) module also requires the\n`--experimental-ffi` flag and is only available in builds with FFI support.\n\nExample:\n\n```js\nconst { DynamicLibrary, suffix } = require('node:ffi');\nconst lib = new DynamicLibrary(`./mylib.${suffix}`);\n```\n\n```console\n$ node --permission --experimental-ffi index.js\nError: Access to this API has been restricted. Use --allow-ffi to manage permissions.\n    at node:internal/main/run_main_module:17:47 {\n  code: 'ERR_ACCESS_DENIED',\n  permission: 'FFI'\n}\n```","summary":"When using the Permission Model, the process will not be able to use FFI APIs by default. Attempts to use FFI APIs will throw an `ERR_ACCESS_DENIED` exception unless the user explicitly passes the `--allow-ffi` flag when starting Node.js. The `node:ffi` module also requires the `--experimental-ffi` flag and is only available in builds with FFI support.","examples":[{"language":"js","displayName":null,"code":"const { DynamicLibrary, suffix } = require('node:ffi');\nconst lib = new DynamicLibrary(`./mylib.${suffix}`);"},{"language":"console","displayName":null,"code":"$ node --permission --experimental-ffi index.js\nError: Access to this API has been restricted. Use --allow-ffi to manage permissions.\n    at node:internal/main/run_main_module:17:47 {\n  code: 'ERR_ACCESS_DENIED',\n  permission: 'FFI'\n}"}],"children":[]},{"kind":"section","id":"--allow-fs-read","name":"--allow-fs-read","title":"`--allow-fs-read`","scope":"module","overloadOf":null,"stability":null,"added":["v20.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.2.0","v22.17.0"],"prUrl":"https://github.com/nodejs/node/pull/58579","commit":null,"description":"Entrypoints of your application are allowed to be read implicitly."},{"versions":["v23.5.0","v22.13.0"],"prUrl":"https://github.com/nodejs/node/pull/56201","commit":null,"description":"Permission Model and --allow-fs flags are stable."},{"versions":["v20.7.0"],"prUrl":"https://github.com/nodejs/node/pull/49047","commit":null,"description":"Paths delimited by comma (`,`) are no longer allowed."}],"description":"This flag configures file system read permissions using\nthe [Permission Model](permissions.html#permission-model).\n\nThe valid arguments for the `--allow-fs-read` flag are:\n\n* `*` - To allow all `FileSystemRead` operations.\n* Multiple paths can be allowed using multiple `--allow-fs-read` flags.\n  Example `--allow-fs-read=/folder1/ --allow-fs-read=/folder2/`\n\nExamples can be found in the [File System Permissions](permissions.html#file-system-permissions) documentation.\n\nThe initializer module and custom `--require` modules has a implicit\nread permission.\n\n```console\n$ node --permission -r custom-require.js -r custom-require-2.js index.js\n```\n\n* The `custom-require.js`, `custom-require-2.js`, and `index.js` will be\n  by default in the allowed read list.\n\n```js\nprocess.permission.has('fs.read', 'index.js'); // true\nprocess.permission.has('fs.read', 'custom-require.js'); // true\nprocess.permission.has('fs.read', 'custom-require-2.js'); // true\n```","summary":"This flag configures file system read permissions using the Permission Model.","examples":[{"language":"console","displayName":null,"code":"$ node --permission -r custom-require.js -r custom-require-2.js index.js"},{"language":"js","displayName":null,"code":"process.permission.has('fs.read', 'index.js'); // true\nprocess.permission.has('fs.read', 'custom-require.js'); // true\nprocess.permission.has('fs.read', 'custom-require-2.js'); // true"}],"children":[]},{"kind":"section","id":"--allow-fs-write","name":"--allow-fs-write","title":"`--allow-fs-write`","scope":"module","overloadOf":null,"stability":null,"added":["v20.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v23.5.0","v22.13.0"],"prUrl":"https://github.com/nodejs/node/pull/56201","commit":null,"description":"Permission Model and --allow-fs flags are stable."},{"versions":["v20.7.0"],"prUrl":"https://github.com/nodejs/node/pull/49047","commit":null,"description":"Paths delimited by comma (`,`) are no longer allowed."}],"description":"This flag configures file system write permissions using\nthe [Permission Model](permissions.html#permission-model).\n\nThe valid arguments for the `--allow-fs-write` flag are:\n\n* `*` - To allow all `FileSystemWrite` operations.\n* Multiple paths can be allowed using multiple `--allow-fs-write` flags.\n  Example `--allow-fs-write=/folder1/ --allow-fs-write=/folder2/`\n\nPaths delimited by comma (`,`) are no longer allowed.\nWhen passing a single flag with a comma a warning will be displayed.\n\nExamples can be found in the [File System Permissions](permissions.html#file-system-permissions) documentation.","summary":"This flag configures file system write permissions using the Permission Model.","examples":[],"children":[]},{"kind":"section","id":"--allow-inspector","name":"--allow-inspector","title":"`--allow-inspector`","scope":"module","overloadOf":null,"stability":{"index":"1.0","description":"Early development"},"added":["v25.0.0","v24.12.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When using the [Permission Model](permissions.html#permission-model), the process will not be able to connect\nthrough inspector protocol.\n\nAttempts to do so will throw an `ERR_ACCESS_DENIED` unless the\nuser explicitly passes the `--allow-inspector` flag when starting Node.js.\n\nExample:\n\n```js\nconst { Session } = require('node:inspector/promises');\n\nconst session = new Session();\nsession.connect();\n```\n\n```console\n$ node --permission index.js\nError: connect ERR_ACCESS_DENIED Access to this API has been restricted. Use --allow-inspector to manage permissions.\n  code: 'ERR_ACCESS_DENIED',\n}\n```","summary":"When using the Permission Model, the process will not be able to connect through inspector protocol.","examples":[{"language":"js","displayName":null,"code":"const { Session } = require('node:inspector/promises');\n\nconst session = new Session();\nsession.connect();"},{"language":"console","displayName":null,"code":"$ node --permission index.js\nError: connect ERR_ACCESS_DENIED Access to this API has been restricted. Use --allow-inspector to manage permissions.\n  code: 'ERR_ACCESS_DENIED',\n}"}],"children":[]},{"kind":"section","id":"--allow-net","name":"--allow-net","title":"`--allow-net`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":["v25.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When using the [Permission Model](permissions.html#permission-model), the process will not be able to access\nnetwork by default.\nAttempts to do so will throw an `ERR_ACCESS_DENIED` unless the\nuser explicitly passes the `--allow-net` flag when starting Node.js.\n\nExample:\n\n```js\nconst http = require('node:http');\n// Attempt to bypass the permission\nconst req = http.get('http://example.com', () => {});\n\nreq.on('error', (err) => {\n  console.log('err', err);\n});\n```\n\n```console\n$ node --permission index.js\nError: connect ERR_ACCESS_DENIED Access to this API has been restricted. Use --allow-net to manage permissions.\n  code: 'ERR_ACCESS_DENIED',\n}\n```","summary":"When using the Permission Model, the process will not be able to access network by default. Attempts to do so will throw an `ERR_ACCESS_DENIED` unless the user explicitly passes the `--allow-net` flag when starting Node.js.","examples":[{"language":"js","displayName":null,"code":"const http = require('node:http');\n// Attempt to bypass the permission\nconst req = http.get('http://example.com', () => {});\n\nreq.on('error', (err) => {\n  console.log('err', err);\n});"},{"language":"console","displayName":null,"code":"$ node --permission index.js\nError: connect ERR_ACCESS_DENIED Access to this API has been restricted. Use --allow-net to manage permissions.\n  code: 'ERR_ACCESS_DENIED',\n}"}],"children":[]},{"kind":"section","id":"--allow-openssl-store","name":"--allow-openssl-store","title":"`--allow-openssl-store`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":["v26.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When using the [Permission Model](permissions.html#permission-model), the process will not be able to use\nOpenSSL STORE loaders by default, for example to load a private key from a\n{URL} passed to [`crypto.createPrivateKey()`](crypto.html#cryptocreateprivatekeykey). Attempts to do so will throw\nan `ERR_ACCESS_DENIED` unless the user explicitly passes the\n`--allow-openssl-store` flag. This permission can be dropped at runtime via\n[`permission.drop()`](permissions.html#permissiondropscope-reference).\n\nThis flag grants broad authority to configured OpenSSL STORE loaders. A loader\nmay access files, devices, tokens, or the network. Access performed by a loader\nis not constrained by the `fs.read`, `fs.write`, or `net` permission scopes.","summary":"When using the Permission Model, the process will not be able to use OpenSSL STORE loaders by default, for example to load a private key from a {URL} passed to `crypto.createPrivateKey()`. Attempts to do so will throw an `ERR_ACCESS_DENIED` unless the user explicitly passes the `--allow-openssl-store` flag. This permission can be dropped at runtime via `permission.drop()`.","examples":[],"children":[]},{"kind":"section","id":"--allow-wasi","name":"--allow-wasi","title":"`--allow-wasi`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":["v22.3.0","v20.16.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When using the [Permission Model](permissions.html#permission-model), the process will not be capable of creating\nany WASI instances by default.\nFor security reasons, the call will throw an `ERR_ACCESS_DENIED` unless the\nuser explicitly passes the flag `--allow-wasi` in the main Node.js process.\n\nExample:\n\n```js\nconst { WASI } = require('node:wasi');\n// Attempt to bypass the permission\nnew WASI({\n  version: 'preview1',\n  // Attempt to mount the whole filesystem\n  preopens: {\n    '/': '/',\n  },\n});\n```\n\n```console\n$ node --permission --allow-fs-read=* index.js\n\nError: Access to this API has been restricted\n    at node:internal/main/run_main_module:30:49 {\n  code: 'ERR_ACCESS_DENIED',\n  permission: 'WASI',\n}\n```","summary":"When using the Permission Model, the process will not be capable of creating any WASI instances by default. For security reasons, the call will throw an `ERR_ACCESS_DENIED` unless the user explicitly passes the flag `--allow-wasi` in the main Node.js process.","examples":[{"language":"js","displayName":null,"code":"const { WASI } = require('node:wasi');\n// Attempt to bypass the permission\nnew WASI({\n  version: 'preview1',\n  // Attempt to mount the whole filesystem\n  preopens: {\n    '/': '/',\n  },\n});"},{"language":"console","displayName":null,"code":"$ node --permission --allow-fs-read=* index.js\n\nError: Access to this API has been restricted\n    at node:internal/main/run_main_module:30:49 {\n  code: 'ERR_ACCESS_DENIED',\n  permission: 'WASI',\n}"}],"children":[]},{"kind":"section","id":"--allow-worker","name":"--allow-worker","title":"`--allow-worker`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":["v20.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When using the [Permission Model](permissions.html#permission-model), the process will not be able to create any\nworker threads by default.\nFor security reasons, the call will throw an `ERR_ACCESS_DENIED` unless the\nuser explicitly pass the flag `--allow-worker` in the main Node.js process.\n\nExample:\n\n```js\nconst { Worker } = require('node:worker_threads');\n// Attempt to bypass the permission\nnew Worker(__filename);\n```\n\n```console\n$ node --permission --allow-fs-read=* index.js\n\nError: Access to this API has been restricted\n    at node:internal/main/run_main_module:17:47 {\n  code: 'ERR_ACCESS_DENIED',\n  permission: 'WorkerThreads'\n}\n```","summary":"When using the Permission Model, the process will not be able to create any worker threads by default. For security reasons, the call will throw an `ERR_ACCESS_DENIED` unless the user explicitly pass the flag `--allow-worker` in the main Node.js process.","examples":[{"language":"js","displayName":null,"code":"const { Worker } = require('node:worker_threads');\n// Attempt to bypass the permission\nnew Worker(__filename);"},{"language":"console","displayName":null,"code":"$ node --permission --allow-fs-read=* index.js\n\nError: Access to this API has been restricted\n    at node:internal/main/run_main_module:17:47 {\n  code: 'ERR_ACCESS_DENIED',\n  permission: 'WorkerThreads'\n}"}],"children":[]},{"kind":"section","id":"--build-seaconfig","name":"--build-sea=config","title":"`--build-sea=config`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":["v25.5.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Generates a [single executable application](single-executable-applications.html) from a JSON\nconfiguration file. The argument must be a path to the configuration file. If\nthe path is not absolute, it is resolved relative to the current working\ndirectory.\n\nFor configuration fields, cross-platform notes, and asset APIs, see\nthe [single executable application](single-executable-applications.html) documentation.","summary":"Generates a single executable application from a JSON configuration file. The argument must be a path to the configuration file. If the path is not absolute, it is resolved relative to the current working directory.","examples":[],"children":[]},{"kind":"section","id":"--build-snapshot","name":"--build-snapshot","title":"`--build-snapshot`","scope":"module","overloadOf":null,"stability":null,"added":["v18.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v25.4.0","v24.13.1"],"prUrl":"https://github.com/nodejs/node/pull/60954","commit":null,"description":"The snapshot building process is no longer experimental."}],"description":"Generates a snapshot blob when the process exits and writes it to\ndisk, which can be loaded later with `--snapshot-blob`.\n\nWhen building the snapshot, if `--snapshot-blob` is not specified,\nthe generated blob will be written, by default, to `snapshot.blob`\nin the current working directory. Otherwise it will be written to\nthe path specified by `--snapshot-blob`.\n\n```console\n$ echo \"globalThis.foo = 'I am from the snapshot'\" > snapshot.js\n\n# Run snapshot.js to initialize the application and snapshot the\n# state of it into snapshot.blob.\n$ node --snapshot-blob snapshot.blob --build-snapshot snapshot.js\n\n$ echo \"console.log(globalThis.foo)\" > index.js\n\n# Load the generated snapshot and start the application from index.js.\n$ node --snapshot-blob snapshot.blob index.js\nI am from the snapshot\n```\n\nThe [`v8.startupSnapshot` API](v8.html#startup-snapshot-api) can be used to specify an entry point at\nsnapshot building time, thus avoiding the need of an additional entry\nscript at deserialization time:\n\n```console\n$ echo \"require('v8').startupSnapshot.setDeserializeMainFunction(() => console.log('I am from the snapshot'))\" > snapshot.js\n$ node --snapshot-blob snapshot.blob --build-snapshot snapshot.js\n$ node --snapshot-blob snapshot.blob\nI am from the snapshot\n```\n\nFor more information, check out the [`v8.startupSnapshot` API](v8.html#startup-snapshot-api) documentation.\n\nThe snapshot currently only supports loading a single entrypoint during the\nsnapshot building process, which can load built-in modules, but not additional user-land modules.\nUsers can bundle their applications into a single script with their bundler\nof choice before building a snapshot.\n\nAs it's complicated to ensure the serializablility of all built-in modules,\nwhich are also growing over time, only a subset of the built-in modules are\nwell tested to be serializable during the snapshot building process.\nThe Node.js core test suite checks that a few fairly complex applications\ncan be snapshotted. The list of built-in modules being\n[captured by the built-in snapshot of Node.js](https://github.com/nodejs/node/blob/b19525a33cc84033af4addd0f80acd4dc33ce0cf/test/parallel/test-bootstrap-modules.js#L24) is considered supported.\nWhen the snapshot builder encounters a built-in module that cannot be\nserialized, it may crash the snapshot building process. In that case a typical\nworkaround would be to delay loading that module until\nruntime, using either [`v8.startupSnapshot.setDeserializeMainFunction()`](v8.html#v8startupsnapshotsetdeserializemainfunctioncallback-data) or\n[`v8.startupSnapshot.addDeserializeCallback()`](v8.html#v8startupsnapshotadddeserializecallbackcallback-data). If serialization for\nan additional module during the snapshot building process is needed,\nplease file a request in the [Node.js issue tracker](https://github.com/nodejs/node/issues) and link to it in the\n[tracking issue for user-land snapshots](https://github.com/nodejs/node/issues/44014).","summary":"Generates a snapshot blob when the process exits and writes it to disk, which can be loaded later with `--snapshot-blob`.","examples":[{"language":"console","displayName":null,"code":"$ echo \"globalThis.foo = 'I am from the snapshot'\" > snapshot.js\n\n# Run snapshot.js to initialize the application and snapshot the\n# state of it into snapshot.blob.\n$ node --snapshot-blob snapshot.blob --build-snapshot snapshot.js\n\n$ echo \"console.log(globalThis.foo)\" > index.js\n\n# Load the generated snapshot and start the application from index.js.\n$ node --snapshot-blob snapshot.blob index.js\nI am from the snapshot"},{"language":"console","displayName":null,"code":"$ echo \"require('v8').startupSnapshot.setDeserializeMainFunction(() => console.log('I am from the snapshot'))\" > snapshot.js\n$ node --snapshot-blob snapshot.blob --build-snapshot snapshot.js\n$ node --snapshot-blob snapshot.blob\nI am from the snapshot"}],"children":[]},{"kind":"section","id":"--build-snapshot-config","name":"--build-snapshot-config","title":"`--build-snapshot-config`","scope":"module","overloadOf":null,"stability":null,"added":["v21.6.0","v20.12.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v25.4.0","v24.13.1"],"prUrl":"https://github.com/nodejs/node/pull/60954","commit":null,"description":"The snapshot building process is no longer experimental."}],"description":"Specifies the path to a JSON configuration file which configures snapshot\ncreation behavior.\n\nThe following options are currently supported:\n\n* `builder` {string} Required. Provides the name to the script that is executed\n  before building the snapshot, as if [`--build-snapshot`](#--build-snapshot) had been passed\n  with `builder` as the main script name.\n* `withoutCodeCache` {boolean} Optional. Including the code cache reduces the\n  time spent on compiling functions included in the snapshot at the expense\n  of a bigger snapshot size and potentially breaking portability of the\n  snapshot.\n\nWhen using this flag, additional script files provided on the command line will\nnot be executed and instead be interpreted as regular command line arguments.","summary":"Specifies the path to a JSON configuration file which configures snapshot creation behavior.","examples":[],"children":[]},{"kind":"section","id":"-check","name":"-c, --check","title":"`-c`, `--check`","scope":"module","overloadOf":null,"stability":null,"added":["v5.0.0","v4.2.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v10.0.0"],"prUrl":"https://github.com/nodejs/node/pull/19600","commit":null,"description":"The `--require` option is now supported when checking a file."}],"description":"Syntax check the script without executing.","summary":"Syntax check the script without executing.","examples":[],"children":[]},{"kind":"section","id":"--completion-bash","name":"--completion-bash","title":"`--completion-bash`","scope":"module","overloadOf":null,"stability":null,"added":["v10.12.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Print source-able bash completion script for Node.js.\n\n```bash\nnode --completion-bash > node_bash_completion\nsource node_bash_completion\n```","summary":"Print source-able bash completion script for Node.js.","examples":[{"language":"bash","displayName":null,"code":"node --completion-bash > node_bash_completion\nsource node_bash_completion"}],"children":[]},{"kind":"section","id":"-conditionscondition","name":"-C condition, --conditions=condition","title":"`-C condition`, `--conditions=condition`","scope":"module","overloadOf":null,"stability":null,"added":["v14.9.0","v12.19.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.9.0","v20.18.0"],"prUrl":"https://github.com/nodejs/node/pull/54209","commit":null,"description":"The flag is no longer experimental."}],"description":"Provide custom [conditional exports](packages.html#conditional-exports) resolution conditions.\n\nAny number of custom string condition names are permitted.\n\nThe default Node.js conditions of `\"node\"`, `\"default\"`, `\"import\"`, and\n`\"require\"` will always apply as defined.\n\nFor example, to run a module with \"development\" resolutions:\n\n```bash\nnode -C development app.js\n```","summary":"Provide custom conditional exports resolution conditions.","examples":[{"language":"bash","displayName":null,"code":"node -C development app.js"}],"children":[]},{"kind":"section","id":"--cpu-prof","name":"--cpu-prof","title":"`--cpu-prof`","scope":"module","overloadOf":null,"stability":null,"added":["v12.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.4.0","v20.16.0"],"prUrl":"https://github.com/nodejs/node/pull/53343","commit":null,"description":"The `--cpu-prof` flags are now stable."}],"description":"Starts the V8 CPU profiler on start up, and writes the CPU profile to disk\nbefore exit.\n\nIf `--cpu-prof-dir` is not specified, the generated profile is placed\nin the current working directory.\n\nIf `--cpu-prof-name` is not specified, the generated profile is\nnamed `CPU.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.cpuprofile`.\n\n```console\n$ node --cpu-prof index.js\n$ ls *.cpuprofile\nCPU.20190409.202950.15293.0.0.cpuprofile\n```\n\nIf `--cpu-prof-name` is specified, the provided value is used as a template\nfor the file name. The following placeholder is supported and will be\nsubstituted at runtime:\n\n* `${pid}` — the current process ID\n\n```console\n$ node --cpu-prof --cpu-prof-name 'CPU.${pid}.cpuprofile' index.js\n$ ls *.cpuprofile\nCPU.15293.cpuprofile\n```","summary":"Starts the V8 CPU profiler on start up, and writes the CPU profile to disk before exit.","examples":[{"language":"console","displayName":null,"code":"$ node --cpu-prof index.js\n$ ls *.cpuprofile\nCPU.20190409.202950.15293.0.0.cpuprofile"},{"language":"console","displayName":null,"code":"$ node --cpu-prof --cpu-prof-name 'CPU.${pid}.cpuprofile' index.js\n$ ls *.cpuprofile\nCPU.15293.cpuprofile"}],"children":[]},{"kind":"section","id":"--cpu-prof-dir","name":"--cpu-prof-dir","title":"`--cpu-prof-dir`","scope":"module","overloadOf":null,"stability":null,"added":["v12.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.4.0","v20.16.0"],"prUrl":"https://github.com/nodejs/node/pull/53343","commit":null,"description":"The `--cpu-prof` flags are now stable."}],"description":"Specify the directory where the CPU profiles generated by `--cpu-prof` will\nbe placed.\n\nThe default value is controlled by the\n[`--diagnostic-dir`](#--diagnostic-dirdirectory) command-line option.","summary":"Specify the directory where the CPU profiles generated by `--cpu-prof` will be placed.","examples":[],"children":[]},{"kind":"section","id":"--cpu-prof-interval","name":"--cpu-prof-interval","title":"`--cpu-prof-interval`","scope":"module","overloadOf":null,"stability":null,"added":["v12.2.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.4.0","v20.16.0"],"prUrl":"https://github.com/nodejs/node/pull/53343","commit":null,"description":"The `--cpu-prof` flags are now stable."}],"description":"Specify the sampling interval in microseconds for the CPU profiles generated\nby `--cpu-prof`. The default is 1000 microseconds.","summary":"Specify the sampling interval in microseconds for the CPU profiles generated by `--cpu-prof`. The default is 1000 microseconds.","examples":[],"children":[]},{"kind":"section","id":"--cpu-prof-name","name":"--cpu-prof-name","title":"`--cpu-prof-name`","scope":"module","overloadOf":null,"stability":null,"added":["v12.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.4.0","v20.16.0"],"prUrl":"https://github.com/nodejs/node/pull/53343","commit":null,"description":"The `--cpu-prof` flags are now stable."}],"description":"Specify the file name of the CPU profile generated by `--cpu-prof`.","summary":"Specify the file name of the CPU profile generated by `--cpu-prof`.","examples":[],"children":[]},{"kind":"section","id":"--diagnostic-dirdirectory","name":"--diagnostic-dir=directory","title":"`--diagnostic-dir=directory`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Set the directory to which all diagnostic output files are written.\nDefaults to current working directory.\n\nAffects the default output directory of:\n\n* [`--cpu-prof-dir`](#--cpu-prof-dir)\n* [`--heap-prof-dir`](#--heap-prof-dir)\n* [`--redirect-warnings`](#--redirect-warningsfile)","summary":"Set the directory to which all diagnostic output files are written. Defaults to current working directory.","examples":[],"children":[]},{"kind":"section","id":"--disable-protomode","name":"--disable-proto=mode","title":"`--disable-proto=mode`","scope":"module","overloadOf":null,"stability":null,"added":["v13.12.0","v12.17.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Disable the `Object.prototype.__proto__` property. If `mode` is `delete`, the\nproperty is removed entirely. If `mode` is `throw`, accesses to the\nproperty throw an exception with the code `ERR_PROTO_ACCESS`.","summary":"Disable the `Object.prototype.__proto__` property. If `mode` is `delete`, the property is removed entirely. If `mode` is `throw`, accesses to the property throw an exception with the code `ERR_PROTO_ACCESS`.","examples":[],"children":[]},{"kind":"section","id":"--disable-sigusr1","name":"--disable-sigusr1","title":"`--disable-sigusr1`","scope":"module","overloadOf":null,"stability":null,"added":["v23.7.0","v22.14.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.8.0","v22.20.0"],"prUrl":"https://github.com/nodejs/node/pull/59707","commit":null,"description":"The option is no longer experimental."}],"description":"Disable the ability of starting a debugging session by sending a\n`SIGUSR1` signal to the process.","summary":"Disable the ability of starting a debugging session by sending a `SIGUSR1` signal to the process.","examples":[],"children":[]},{"kind":"section","id":"--disable-warningcode-or-type","name":"--disable-warning=code-or-type","title":"`--disable-warning=code-or-type`","scope":"module","overloadOf":null,"stability":{"index":"2","description":"Stable"},"added":["v21.3.0","v20.11.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v26.7.0"],"prUrl":"https://github.com/nodejs/node/pull/64742","commit":null,"description":"The `--disable-warning` flag is now stable."}],"description":"Disable specific process warnings by `code` or `type`.\n\nWarnings emitted from [`process.emitWarning()`](process.html#processemitwarningwarning-options) may contain a\n`code` and a `type`. This option will not-emit warnings that have a matching\n`code` or `type`.\n\nList of [deprecation warnings](deprecations.html#list-of-deprecated-apis).\n\nThe Node.js core warning types are: `DeprecationWarning` and\n`ExperimentalWarning`\n\nFor example, the following script will not emit\n[DEP0025 `require('node:sys')`](deprecations.html#dep0025-requirenodesys) when executed with\n`node --disable-warning=DEP0025`:\n\n```mjs\nimport sys from 'node:sys';\n```\n\n```cjs\nconst sys = require('node:sys');\n```\n\nFor example, the following script will emit the\n[DEP0025 `require('node:sys')`](deprecations.html#dep0025-requirenodesys), but not any Experimental\nWarnings (such as\n[ExperimentalWarning: `vm.measureMemory` is an experimental feature](vm.html#vmmeasurememoryoptions)\nin <=v21) when executed with `node --disable-warning=ExperimentalWarning`:\n\n```mjs\nimport sys from 'node:sys';\nimport vm from 'node:vm';\n\nvm.measureMemory();\n```\n\n```cjs\nconst sys = require('node:sys');\nconst vm = require('node:vm');\n\nvm.measureMemory();\n```","summary":"Disable specific process warnings by `code` or `type`.","examples":[{"language":"mjs","displayName":null,"code":"import sys from 'node:sys';"},{"language":"cjs","displayName":null,"code":"const sys = require('node:sys');"},{"language":"mjs","displayName":null,"code":"import sys from 'node:sys';\nimport vm from 'node:vm';\n\nvm.measureMemory();"},{"language":"cjs","displayName":null,"code":"const sys = require('node:sys');\nconst vm = require('node:vm');\n\nvm.measureMemory();"}],"children":[]},{"kind":"section","id":"--disable-wasm-trap-handler","name":"--disable-wasm-trap-handler","title":"`--disable-wasm-trap-handler`","scope":"module","overloadOf":null,"stability":null,"added":["v22.2.0","v20.15.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v26.0.0"],"prUrl":"https://github.com/nodejs/node/pull/62132","commit":null,"description":"Node.js now automatically disables the trap handler when there is not enough virtual memory available at startup to allocate one cage."}],"description":"Node.js enables V8's trap-handler-based WebAssembly bound checks on 64-bit platforms,\nwhich significantly improves WebAssembly performance by eliminating the need for\ninline bound checks. This optimization requires allocating a large virtual memory\ncage per WebAssembly memory instance (currently typically 8GB for 32-bit WebAssembly memory,\n16GB for 64-bit WebAssembly memory) to trap out-of-bound accesses. On most 64-bit\nplatforms, the virtual memory address space is usually large enough (around 128TB)\nto accommodate typical WebAssembly usages, but if the machine has manual limits\non virtual memory (e.g. through `ulimit -v`), WebAssembly memory allocation is\nmore likely to fail with `WebAssembly.Memory(): could not allocate memory`.\n\nAt startup, Node.js automatically checks whether there is enough virtual memory\navailable to allocate at least one cage, and if not, the trap-handler optimization\nis automatically disabled so that WebAssembly can still run using inline\nbound checks (with less optimal performance). But if the application needs to create\nmany WebAssembly memory instances and the machine still configures a relatively high\nlimit on virtual memory, allocation of WebAssembly memory instances may still fail\nmore quickly than expected due to the raised virtual memory usage.\n\n`--disable-wasm-trap-handler` fully disables this optimization so that WebAssembly memory\ninstances always use inline bound checks instead of reserving large virtual memory cages.\nThis allows more instances to be created when the virtual memory address space available\nto the Node.js process is limited.","summary":"Node.js enables V8's trap-handler-based WebAssembly bound checks on 64-bit platforms, which significantly improves WebAssembly performance by eliminating the need for inline bound checks. This optimization requires allocating a large virtual memory cage per WebAssembly memory instance (currently typically 8GB for 32-bit WebAssembly memory, 16GB for 64-bit WebAssembly memory) to trap out-of-bound accesses. On most 64-bit platforms, the virtual memory address space is usually large enough (around 128TB) to accommodate typical WebAssembly usages, but if the machine has manual limits on virtual memory (e.g. through `ulimit -v`), WebAssembly memory allocation is more likely to fail with `WebAssembly.Memory(): could not allocate memory`.","examples":[],"children":[]},{"kind":"section","id":"--disallow-code-generation-from-strings","name":"--disallow-code-generation-from-strings","title":"`--disallow-code-generation-from-strings`","scope":"module","overloadOf":null,"stability":null,"added":["v9.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Make built-in language features like `eval` and `new Function` that generate\ncode from strings throw an exception instead. This does not affect the Node.js\n`node:vm` module.","summary":"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 `node:vm` module.","examples":[],"children":[]},{"kind":"section","id":"--dns-result-orderorder","name":"--dns-result-order=order","title":"`--dns-result-order=order`","scope":"module","overloadOf":null,"stability":null,"added":["v16.4.0","v14.18.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.1.0","v20.13.0"],"prUrl":"https://github.com/nodejs/node/pull/52492","commit":null,"description":"The `ipv6first` is supported now."},{"versions":["v17.0.0"],"prUrl":"https://github.com/nodejs/node/pull/39987","commit":null,"description":"Changed default value to `verbatim`."}],"description":"Set the default value of `order` in [`dns.lookup()`](dns.html#dnslookuphostname-options-callback) and\n[`dnsPromises.lookup()`](dns.html#dnspromiseslookuphostname-options). The value could be:\n\n* `ipv4first`: sets default `order` to `ipv4first`.\n* `ipv6first`: sets default `order` to `ipv6first`.\n* `verbatim`: sets default `order` to `verbatim`.\n\nThe default is `verbatim` and [`dns.setDefaultResultOrder()`](dns.html#dnssetdefaultresultorderorder) have higher\npriority than `--dns-result-order`.","summary":"Set the default value of `order` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be:","examples":[],"children":[]},{"kind":"section","id":"--enable-fips","name":"--enable-fips","title":"`--enable-fips`","scope":"module","overloadOf":null,"stability":null,"added":["v6.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable [FIPS mode](crypto.html#fips-mode) at startup. With OpenSSL 3, a configured provider named\n`fips` must be available and initialize successfully. With OpenSSL 1.1.1,\nNode.js must be built against a FIPS-capable OpenSSL.","summary":"Enable FIPS mode at startup. With OpenSSL 3, a configured provider named `fips` must be available and initialize successfully. With OpenSSL 1.1.1, Node.js must be built against a FIPS-capable OpenSSL.","examples":[],"children":[]},{"kind":"section","id":"--enable-source-maps","name":"--enable-source-maps","title":"`--enable-source-maps`","scope":"module","overloadOf":null,"stability":null,"added":["v12.12.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v15.11.0","v14.18.0"],"prUrl":"https://github.com/nodejs/node/pull/37362","commit":null,"description":"This API is no longer experimental."}],"description":"Enable [Source Map](https://tc39.es/ecma426/) support for stack traces.\n\nWhen using a transpiler, such as TypeScript, stack traces thrown by an\napplication reference the transpiled code, not the original source position.\n`--enable-source-maps` enables caching of Source Maps and makes a best\neffort to report stack traces relative to the original source file.\n\nOverriding `Error.prepareStackTrace` may prevent `--enable-source-maps` from\nmodifying the stack trace. Call and return the results of the original\n`Error.prepareStackTrace` in the overriding function to modify the stack trace\nwith source maps.\n\n```js\nconst originalPrepareStackTrace = Error.prepareStackTrace;\nError.prepareStackTrace = (error, trace) => {\n  // Modify error and trace and format stack trace with\n  // original Error.prepareStackTrace.\n  return originalPrepareStackTrace(error, trace);\n};\n```\n\nNote, enabling source maps can introduce latency to your application\nwhen `Error.stack` is accessed. If you access `Error.stack` frequently\nin your application, take into account the performance implications\nof `--enable-source-maps`.","summary":"Enable Source Map support for stack traces.","examples":[{"language":"js","displayName":null,"code":"const originalPrepareStackTrace = Error.prepareStackTrace;\nError.prepareStackTrace = (error, trace) => {\n  // Modify error and trace and format stack trace with\n  // original Error.prepareStackTrace.\n  return originalPrepareStackTrace(error, trace);\n};"}],"children":[]},{"kind":"section","id":"--entry-url","name":"--entry-url","title":"`--entry-url`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v23.0.0","v22.10.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When present, Node.js will interpret the entry point as a URL, rather than a\npath.\n\nFollows [ECMAScript module](esm.html#modules-ecmascript-modules) resolution rules.\n\nAny query parameter or hash in the URL will be accessible via [`import.meta.url`](esm.html#importmetaurl).\n\n```bash\nnode --entry-url 'file:///path/to/file.js?queryparams=work#and-hashes-too'\nnode --entry-url 'file.ts?query#hash'\nnode --entry-url 'data:text/javascript,console.log(\"Hello\")'\n```","summary":"When present, Node.js will interpret the entry point as a URL, rather than a path.","examples":[{"language":"bash","displayName":null,"code":"node --entry-url 'file:///path/to/file.js?queryparams=work#and-hashes-too'\nnode --entry-url 'file.ts?query#hash'\nnode --entry-url 'data:text/javascript,console.log(\"Hello\")'"}],"children":[]},{"kind":"section","id":"--env-file-if-existsfile","name":"--env-file-if-exists=file","title":"`--env-file-if-exists=file`","scope":"module","overloadOf":null,"stability":null,"added":["v22.9.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.10.0","v22.21.0"],"prUrl":"https://github.com/nodejs/node/pull/59925","commit":null,"description":"The `--env-file-if-exists` flag is no longer experimental."}],"description":"Behavior is the same as [`--env-file`](#--env-filefile), but an error is not thrown if the file\ndoes not exist.","summary":"Behavior is the same as `--env-file`, but an error is not thrown if the file does not exist.","examples":[],"children":[]},{"kind":"section","id":"--env-filefile","name":"--env-file=file","title":"`--env-file=file`","scope":"module","overloadOf":null,"stability":null,"added":["v20.6.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.10.0","v22.21.0"],"prUrl":"https://github.com/nodejs/node/pull/59925","commit":null,"description":"The `--env-file` flag is no longer experimental."},{"versions":["v21.7.0","v20.12.0"],"prUrl":"https://github.com/nodejs/node/pull/51289","commit":null,"description":"Add support to multi-line values."}],"description":"Loads environment variables from a file relative to the current directory,\nmaking them available to applications on `process.env`. The [environment\nvariables which configure Node.js](#environment-variables-1), such as `NODE_OPTIONS`,\nare parsed and applied. If the same variable is defined in the environment and\nin the file, the value from the environment takes precedence.\n\nYou can pass multiple `--env-file` arguments. Subsequent files override\npre-existing variables defined in previous files.\n\nAn error is thrown if the file does not exist.\n\n```bash\nnode --env-file=.env --env-file=.development.env index.js\n```\n\nThe format of the file should be one line per key-value pair of environment\nvariable name and value separated by `=`:\n\n```text\nPORT=3000\n```\n\nAny text after a `#` is treated as a comment:\n\n```text\n# This is a comment\nPORT=3000 # This is also a comment\n```\n\nValues can start and end with the following quotes: `` ` ``, `\"` or `'`.\nThey are omitted from the values.\n\n```text\nUSERNAME=\"nodejs\" # will result in `nodejs` as the value.\n```\n\nMulti-line values are supported:\n\n```text\nMULTI_LINE=\"THIS IS\nA MULTILINE\"\n# will result in `THIS IS\\nA MULTILINE` as the value.\n```\n\nExport keyword before a key is ignored:\n\n```text\nexport USERNAME=\"nodejs\" # will result in `nodejs` as the value.\n```\n\nIf you want to load environment variables from a file that may not exist, you\ncan use the [`--env-file-if-exists`](#--env-file-if-existsfile) flag instead.","summary":"Loads environment variables from a file relative to the current directory, making them available to applications on `process.env`. The environment variables which configure Node.js, such as `NODE_OPTIONS`, are parsed and applied. If the same variable is defined in the environment and in the file, the value from the environment takes precedence.","examples":[{"language":"bash","displayName":null,"code":"node --env-file=.env --env-file=.development.env index.js"},{"language":"text","displayName":null,"code":"PORT=3000"},{"language":"text","displayName":null,"code":"# This is a comment\nPORT=3000 # This is also a comment"},{"language":"text","displayName":null,"code":"USERNAME=\"nodejs\" # will result in `nodejs` as the value."},{"language":"text","displayName":null,"code":"MULTI_LINE=\"THIS IS\nA MULTILINE\"\n# will result in `THIS IS\\nA MULTILINE` as the value."},{"language":"text","displayName":null,"code":"export USERNAME=\"nodejs\" # will result in `nodejs` as the value."}],"children":[]},{"kind":"section","id":"-eval-script","name":"-e, --eval \"script\"","title":"`-e`, `--eval \"script\"`","scope":"module","overloadOf":null,"stability":null,"added":["v0.5.2"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.6.0"],"prUrl":"https://github.com/nodejs/node/pull/53725","commit":null,"description":"Eval now supports experimental type-stripping."},{"versions":["v5.11.0"],"prUrl":"https://github.com/nodejs/node/pull/5348","commit":null,"description":"Built-in libraries are now available as predefined variables."}],"description":"Evaluate the following argument as JavaScript. The modules which are\npredefined in the REPL can also be used in `script`.\n\nIf `script` starts with `-`, pass it using `=` (for example,\n`node --print --eval=-42`) so it is parsed as the value of `--eval`.\n\nOn Windows, using `cmd.exe` a single quote will not work correctly because it\nonly recognizes double `\"` for quoting. In Powershell or Git bash, both `'`\nand `\"` are usable.\n\nIt is possible to run code containing inline types unless the\n[`--no-strip-types`](#--no-strip-types) flag is provided.","summary":"Evaluate the following argument as JavaScript. The modules which are predefined in the REPL can also be used in `script`.","examples":[],"children":[]},{"kind":"section","id":"--experimental-addon-modules","name":"--experimental-addon-modules","title":"`--experimental-addon-modules`","scope":"module","overloadOf":null,"stability":{"index":"1.2","description":"Release candidate"},"added":["v23.6.0","v22.20.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v26.5.0"],"prUrl":"https://github.com/nodejs/node/pull/64221","commit":null,"description":"This is enabled by default."}],"description":"Enable experimental import support for `.node` addons.","summary":"Enable experimental import support for `.node` addons.","examples":[],"children":[]},{"kind":"section","id":"--experimental-config-filepath---experimental-config-file","name":"--experimental-config-file=path, --experimental-config-file","title":"`--experimental-config-file=path`, `--experimental-config-file`","scope":"module","overloadOf":null,"stability":{"index":"1.2","description":"Release candidate"},"added":["v23.10.0","v22.16.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v26.7.0"],"prUrl":"https://github.com/nodejs/node/pull/64516","commit":null,"description":"Marked as release candidate."}],"description":"If present, Node.js will look for a configuration file at the specified path.\nIf the path is not specified, Node.js will look for a `node.config.json` file\nin the current working directory.\nTo specify a custom path, use the `--experimental-config-file=path` form.\nThe space-separated `--experimental-config-file path` form is not supported.\nThe alias `--experimental-default-config-file` is equivalent to\n`--experimental-config-file` without an argument.\nNode.js will read the configuration file and apply the settings. The\nconfiguration file should be a JSON file with the following structure. `vX.Y.Z`\nin the `$schema` must be replaced with the version of Node.js you are using or\n`latest-vX.x` for the latest version of that major release line.\n\n```json\n{\n  \"$schema\": \"https://nodejs.org/dist/vX.Y.Z/docs/node-config-schema.json\",\n  \"nodeOptions\": {\n    \"import\": [\n      \"amaro/strip\"\n    ],\n    \"watch-path\": \"src\",\n    \"watch-preserve-output\": true\n  },\n  \"test\": {\n    \"test-isolation\": \"process\"\n  },\n  \"watch\": {\n    \"watch-preserve-output\": true\n  }\n}\n```\n\nThe configuration file supports namespace-specific options:\n\n* The `nodeOptions` field contains CLI flags that are allowed in [`NODE_OPTIONS`](#node_optionsoptions).\n\n* Namespace fields like `test`, `watch`, and `permission` contain configuration specific to that subsystem.\n\nThe configuration file can target a specific Node.js major version with\n`nodeVersion`:\n\n```json\n{\n  \"nodeVersion\": 25,\n  \"nodeOptions\": {\n    \"watch-path\": \"src\"\n  }\n}\n```\n\nTo keep multiple version-specific configurations in the same file, use the\n`configs` array. Node.js will use the first entry whose `nodeVersion` matches\nthe current Node.js major version:\n\n```json\n{\n  \"$schema\": \"https://nodejs.org/dist/latest-v26.x/docs/node-config-schema.json\",\n  \"configs\": [\n    {\n      \"nodeVersion\": 25,\n      \"config\": {\n        \"$schema\": \"https://nodejs.org/dist/latest-v25.x/docs/node-config-schema.json\",\n        \"nodeOptions\": {\n          \"watch-path\": \"src\"\n        }\n      }\n    }\n  ]\n}\n```\n\nWhen `configs` is used, the top level may only contain `$schema` and\n`configs`. Each `configs` item must define an integer `nodeVersion` and an\nobject `config`. A single top-level config does not require `nodeVersion`, but\nif present it must match the current Node.js major version.\n\nWhen a namespace is present in the\nconfiguration file, Node.js automatically enables the corresponding flag\n(e.g., `--test`, `--watch`, `--permission`). This allows you to configure\nsubsystem-specific options without explicitly passing the flag on the command line.\n\nFor example:\n\n```json\n{\n  \"test\": {\n    \"test-isolation\": \"process\"\n  }\n}\n```\n\nis equivalent to:\n\n```bash\nnode --test --test-isolation=process\n```\n\nTo disable the automatic flag while still using namespace options, you can\nexplicitly set the flag to `false` within the namespace:\n\n```json\n{\n  \"test\": {\n    \"test\": false,\n    \"test-isolation\": \"process\"\n  }\n}\n```\n\nNo-op flags are not supported.\nNot all V8 flags are currently supported.\n\nIt is possible to use the [official JSON schema](../node-config-schema.json)\nto validate the configuration file, which may vary depending on the Node.js version.\nEach key in the configuration file corresponds to a flag that can be passed\nas a command-line argument. The value of the key is the value that would be\npassed to the flag.\n\nFor example, the configuration file above is equivalent to\nthe following command-line arguments:\n\n```bash\nnode --import amaro/strip --watch-path=src --watch-preserve-output --test-isolation=process\n```\n\nThe priority in configuration is as follows:\n\n1. NODE\\_OPTIONS and command-line options\n2. Dotenv NODE\\_OPTIONS\n3. Configuration file\n\nValues in the configuration file will not override the values in the environment\nvariables, command-line options, or the `NODE_OPTIONS` env file parsed by the\n`--env-file` flag.\n\nKeys cannot be duplicated within the same or different namespaces.\n\nThe configuration parser will throw an error if the configuration file contains\nunknown keys or keys that cannot be used in a namespace.\n\nNode.js will not sanitize or perform validation on the user-provided configuration,\nso **NEVER** use untrusted configuration files.","summary":"If present, Node.js will look for a configuration file at the specified path. If the path is not specified, Node.js will look for a `node.config.json` file in the current working directory. To specify a custom path, use the `--experimental-config-file=path` form. The space-separated `--experimental-config-file path` form is not supported. The alias `--experimental-default-config-file` is equivalent to `--experimental-config-file` without an argument. Node.js will read the configuration file and apply the settings. The configuration file should be a JSON file with the following structure. `vX.Y.Z` in the `$schema` must be replaced with the version of Node.js you are using or `latest-vX.x` for the latest version of that major release line.","examples":[{"language":"json","displayName":null,"code":"{\n  \"$schema\": \"https://nodejs.org/dist/vX.Y.Z/docs/node-config-schema.json\",\n  \"nodeOptions\": {\n    \"import\": [\n      \"amaro/strip\"\n    ],\n    \"watch-path\": \"src\",\n    \"watch-preserve-output\": true\n  },\n  \"test\": {\n    \"test-isolation\": \"process\"\n  },\n  \"watch\": {\n    \"watch-preserve-output\": true\n  }\n}"},{"language":"json","displayName":null,"code":"{\n  \"nodeVersion\": 25,\n  \"nodeOptions\": {\n    \"watch-path\": \"src\"\n  }\n}"},{"language":"json","displayName":null,"code":"{\n  \"$schema\": \"https://nodejs.org/dist/latest-v26.x/docs/node-config-schema.json\",\n  \"configs\": [\n    {\n      \"nodeVersion\": 25,\n      \"config\": {\n        \"$schema\": \"https://nodejs.org/dist/latest-v25.x/docs/node-config-schema.json\",\n        \"nodeOptions\": {\n          \"watch-path\": \"src\"\n        }\n      }\n    }\n  ]\n}"},{"language":"json","displayName":null,"code":"{\n  \"test\": {\n    \"test-isolation\": \"process\"\n  }\n}"},{"language":"bash","displayName":null,"code":"node --test --test-isolation=process"},{"language":"json","displayName":null,"code":"{\n  \"test\": {\n    \"test\": false,\n    \"test-isolation\": \"process\"\n  }\n}"},{"language":"bash","displayName":null,"code":"node --import amaro/strip --watch-path=src --watch-preserve-output --test-isolation=process"}],"children":[]},{"kind":"section","id":"--experimental-default-config-file","name":"--experimental-default-config-file","title":"`--experimental-default-config-file`","scope":"module","overloadOf":null,"stability":{"index":"1.0","description":"Early development"},"added":["v23.10.0","v22.16.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"This flag is an alias for `--experimental-config-file` without an argument.\nIf present, Node.js will look for a\n`node.config.json` file in the current working directory and load it as a\nconfiguration file.","summary":"This flag is an alias for `--experimental-config-file` without an argument. If present, Node.js will look for a `node.config.json` file in the current working directory and load it as a configuration file.","examples":[],"children":[]},{"kind":"section","id":"--experimental-eventsource","name":"--experimental-eventsource","title":"`--experimental-eventsource`","scope":"module","overloadOf":null,"stability":null,"added":["v22.3.0","v20.18.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable exposition of [EventSource Web API](https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events) on the global scope.","summary":"Enable exposition of EventSource Web API on the global scope.","examples":[],"children":[]},{"kind":"section","id":"--experimental-ffi","name":"--experimental-ffi","title":"`--experimental-ffi`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v26.1.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable the experimental [`node:ffi`](ffi.html) module.\n\nThis flag is only available in builds with FFI support.","summary":"Enable the experimental `node:ffi` module.","examples":[],"children":[]},{"kind":"section","id":"--experimental-import-meta-resolve","name":"--experimental-import-meta-resolve","title":"`--experimental-import-meta-resolve`","scope":"module","overloadOf":null,"stability":null,"added":["v13.9.0","v12.16.2"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v20.6.0","v18.19.0"],"prUrl":"https://github.com/nodejs/node/pull/49028","commit":null,"description":"synchronous import.meta.resolve made available by default, with the flag retained for enabling the experimental second argument as previously supported."}],"description":"Enable experimental `import.meta.resolve()` parent URL support, which allows\npassing a second `parentURL` argument for contextual resolution.\n\nPreviously gated the entire `import.meta.resolve` feature.","summary":"Enable experimental `import.meta.resolve()` parent URL support, which allows passing a second `parentURL` argument for contextual resolution.","examples":[],"children":[]},{"kind":"section","id":"--experimental-import-text","name":"--experimental-import-text","title":"`--experimental-import-text`","scope":"module","overloadOf":null,"stability":{"index":"1.0","description":"Early development"},"added":["v26.5.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable experimental support for importing modules with\n`with { type: 'text' }`.","summary":"Enable experimental support for importing modules with `with { type: 'text' }`.","examples":[],"children":[]},{"kind":"section","id":"--experimental-inspector-network-resource","name":"--experimental-inspector-network-resource","title":"`--experimental-inspector-network-resource`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active Development"},"added":["v24.5.0","v22.19.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable experimental support for inspector network resources.","summary":"Enable experimental support for inspector network resources.","examples":[],"children":[]},{"kind":"section","id":"--experimental-loadermodule","name":"--experimental-loader=module","title":"`--experimental-loader=module`","scope":"module","overloadOf":null,"stability":null,"added":["v8.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v23.6.1","v22.13.1","v20.18.2"],"prUrl":"https://github.com/nodejs-private/node-private/pull/629","commit":null,"description":"Using this feature with the permission model enabled requires passing `--allow-worker`."},{"versions":["v12.11.1"],"prUrl":"https://github.com/nodejs/node/pull/29752","commit":null,"description":"This flag was renamed from `--loader` to `--experimental-loader`."}],"description":"> This flag is discouraged and may be removed in a future version of Node.js.\n> Please use\n> [`--import` with `register()`](module.html#registration-of-asynchronous-customization-hooks) instead.\n\nSpecify the `module` containing exported [asynchronous module customization hooks](module.html#asynchronous-customization-hooks).\n`module` may be any string accepted as an [`import` specifier](esm.html#import-specifiers).\n\nThis feature requires `--allow-worker` if used with the [Permission Model](permissions.html#permission-model).","summary":"Specify the `module` containing exported asynchronous module customization hooks. `module` may be any string accepted as an `import` specifier.","examples":[],"children":[]},{"kind":"section","id":"--experimental-network-inspection","name":"--experimental-network-inspection","title":"`--experimental-network-inspection`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v22.6.0","v20.18.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable experimental support for the network inspection with Chrome DevTools.","summary":"Enable experimental support for the network inspection with Chrome DevTools.","examples":[],"children":[]},{"kind":"section","id":"--experimental-package-mappath","name":"--experimental-package-map=<path>","title":"`--experimental-package-map=<path>`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v26.4.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable experimental package map resolution. The `path` argument specifies the\nlocation of a JSON configuration file that defines package resolution mappings.\n\n```bash\nnode --experimental-package-map=./package-map.json app.js\n```\n\nWhen enabled, bare specifier resolution consults the package map for resolution.\nThis allows explicit control over which packages can import which dependencies.\n\nSee [Package maps](packages.html#package-maps) for details on the configuration file format and\nresolution algorithm.","summary":"Enable experimental package map resolution. The `path` argument specifies the location of a JSON configuration file that defines package resolution mappings.","examples":[{"language":"bash","displayName":null,"code":"node --experimental-package-map=./package-map.json app.js"}],"children":[]},{"kind":"section","id":"--experimental-print-required-tla","name":"--experimental-print-required-tla","title":"`--experimental-print-required-tla`","scope":"module","overloadOf":null,"stability":null,"added":["v22.0.0","v20.17.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v26.5.0"],"prUrl":"https://github.com/nodejs/node/pull/64154","commit":null,"description":"Print the top-level awaits without evaluating the modules."}],"description":"If the ES module graph cannot be `require()`'d because it contains any top-level `await`,\nthis flag allows Node.js to locate and print their locations.","summary":"If the ES module graph cannot be `require()`'d because it contains any top-level `await`, this flag allows Node.js to locate and print their locations.","examples":[],"children":[]},{"kind":"section","id":"--experimental-quic","name":"--experimental-quic","title":"`--experimental-quic`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":["v25.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable experimental support for the QUIC protocol.","summary":"Enable experimental support for the QUIC protocol.","examples":[],"children":[]},{"kind":"section","id":"--experimental-sea-config","name":"--experimental-sea-config","title":"`--experimental-sea-config`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v20.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Use this flag to generate a blob that can be injected into the Node.js\nbinary to produce a [single executable application](single-executable-applications.html). See the documentation\nabout [this configuration](single-executable-applications.html#1-generating-single-executable-preparation-blobs) for details.","summary":"Use this flag to generate a blob that can be injected into the Node.js binary to produce a single executable application. See the documentation about this configuration for details.","examples":[],"children":[]},{"kind":"section","id":"--experimental-shadow-realm","name":"--experimental-shadow-realm","title":"`--experimental-shadow-realm`","scope":"module","overloadOf":null,"stability":null,"added":["v19.0.0","v18.13.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Use this flag to enable [ShadowRealm](https://github.com/tc39/proposal-shadowrealm) support.","summary":"Use this flag to enable ShadowRealm support.","examples":[],"children":[]},{"kind":"section","id":"--experimental-storage-inspection","name":"--experimental-storage-inspection","title":"`--experimental-storage-inspection`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active Development"},"added":["v25.5.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable experimental support for storage inspection","summary":"Enable experimental support for storage inspection","examples":[],"children":[]},{"kind":"section","id":"--experimental-stream-iter","name":"--experimental-stream-iter","title":"`--experimental-stream-iter`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v25.9.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable the experimental [`node:stream/iter`](stream_iter.html) module.","summary":"Enable the experimental `node:stream/iter` module.","examples":[],"children":[]},{"kind":"section","id":"--experimental-test-coverage","name":"--experimental-test-coverage","title":"`--experimental-test-coverage`","scope":"module","overloadOf":null,"stability":null,"added":["v19.7.0","v18.15.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v20.1.0","v18.17.0"],"prUrl":"https://github.com/nodejs/node/pull/47686","commit":null,"description":"This option can be used with `--test`."}],"description":"When used in conjunction with the `node:test` module, a code coverage report is\ngenerated as part of the test runner output. If no tests are run, a coverage\nreport is not generated. See the documentation on\n[collecting code coverage from tests](test.html#collecting-code-coverage) for more details.","summary":"When used in conjunction with the `node:test` module, a code coverage report is generated as part of the test runner output. If no tests are run, a coverage report is not generated. See the documentation on collecting code coverage from tests for more details.","examples":[],"children":[]},{"kind":"section","id":"--experimental-test-module-mocks","name":"--experimental-test-module-mocks","title":"`--experimental-test-module-mocks`","scope":"module","overloadOf":null,"stability":{"index":"1.0","description":"Early development"},"added":["v22.3.0","v20.18.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v23.6.1","v22.13.1","v20.18.2"],"prUrl":"https://github.com/nodejs-private/node-private/pull/629","commit":null,"description":"Using this feature with the permission model enabled requires passing `--allow-worker`."}],"description":"Enable module mocking in the test runner.\n\nThis feature requires `--allow-worker` if used with the [Permission Model](permissions.html#permission-model).","summary":"Enable module mocking in the test runner.","examples":[],"children":[]},{"kind":"section","id":"--experimental-test-tag-filterexpr","name":"--experimental-test-tag-filter='<expr>'","title":"`--experimental-test-tag-filter='<expr>'`","scope":"module","overloadOf":null,"stability":{"index":"1.0","description":"Early development"},"added":["v26.2.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Run only tests that match the provided boolean tag-filter expression. Tests\ndeclare tags via the `tags` option on `test()`, `it()`, `suite()`, or\n`describe()`. Tags inherit from suites to nested tests by union.\n\nThe expression supports boolean operators (`and`/`&&`, `or`/`||`,\n`not`/`!`), parentheses for grouping, and `*` wildcards inside identifiers.\nStandard precedence applies: `not` binds tighter than `and`, which binds\ntighter than `or`. See [Test tags](test.html#test-tags) for the full grammar and behavior.\n\nThe flag may be specified more than once; multiple expressions are combined\nwith AND, so a test must satisfy every expression to run.\n\nA malformed expression causes the test runner to exit with a non-zero status\nbefore running any tests.","summary":"Run only tests that match the provided boolean tag-filter expression. Tests declare tags via the `tags` option on `test()`, `it()`, `suite()`, or `describe()`. Tags inherit from suites to nested tests by union.","examples":[],"children":[]},{"kind":"section","id":"--experimental-vfs","name":"--experimental-vfs","title":"`--experimental-vfs`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v26.4.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable the experimental [`node:vfs`](vfs.html) module.","summary":"Enable the experimental `node:vfs` module.","examples":[],"children":[]},{"kind":"section","id":"--experimental-vm-modules","name":"--experimental-vm-modules","title":"`--experimental-vm-modules`","scope":"module","overloadOf":null,"stability":null,"added":["v9.6.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable experimental ES Module support in the `node:vm` module.","summary":"Enable experimental ES Module support in the `node:vm` module.","examples":[],"children":[]},{"kind":"section","id":"--experimental-wasi-unstable-preview1","name":"--experimental-wasi-unstable-preview1","title":"`--experimental-wasi-unstable-preview1`","scope":"module","overloadOf":null,"stability":null,"added":["v13.3.0","v12.16.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v20.0.0","v18.17.0"],"prUrl":"https://github.com/nodejs/node/pull/47286","commit":null,"description":"This option is no longer required as WASI is enabled by default, but can still be passed."},{"versions":["v13.6.0"],"prUrl":"https://github.com/nodejs/node/pull/30980","commit":null,"description":"changed from `--experimental-wasi-unstable-preview0` to `--experimental-wasi-unstable-preview1`."}],"description":"Enable experimental WebAssembly System Interface (WASI) support.","summary":"Enable experimental WebAssembly System Interface (WASI) support.","examples":[],"children":[]},{"kind":"section","id":"--experimental-worker-inspection","name":"--experimental-worker-inspection","title":"`--experimental-worker-inspection`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active Development"},"added":["v24.1.0","v22.17.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable experimental support for the worker inspection with Chrome DevTools.","summary":"Enable experimental support for the worker inspection with Chrome DevTools.","examples":[],"children":[]},{"kind":"section","id":"--force-context-aware","name":"--force-context-aware","title":"`--force-context-aware`","scope":"module","overloadOf":null,"stability":null,"added":["v12.12.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Disable loading native addons that are not [context-aware](addons.html#context-aware-addons).","summary":"Disable loading native addons that are not context-aware.","examples":[],"children":[]},{"kind":"section","id":"--force-fips","name":"--force-fips","title":"`--force-fips`","scope":"module","overloadOf":null,"stability":null,"added":["v6.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable [FIPS mode](crypto.html#fips-mode) at startup and prevent it from being disabled from script\ncode. The same OpenSSL requirements as [`--enable-fips`](#--enable-fips) apply.","summary":"Enable FIPS mode at startup and prevent it from being disabled from script code. The same OpenSSL requirements as `--enable-fips` apply.","examples":[],"children":[]},{"kind":"section","id":"--force-node-api-uncaught-exceptions-policy","name":"--force-node-api-uncaught-exceptions-policy","title":"`--force-node-api-uncaught-exceptions-policy`","scope":"module","overloadOf":null,"stability":null,"added":["v18.3.0","v16.17.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enforces `uncaughtException` event on Node-API asynchronous callbacks.\n\nTo prevent from an existing add-on from crashing the process, this flag is not\nenabled by default. In the future, this flag will be enabled by default to\nenforce the correct behavior.","summary":"Enforces `uncaughtException` event on Node-API asynchronous callbacks.","examples":[],"children":[]},{"kind":"section","id":"--frozen-intrinsics","name":"--frozen-intrinsics","title":"`--frozen-intrinsics`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v11.12.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable experimental frozen intrinsics like `Array` and `Object`.\n\nOnly the root context is supported. There is no guarantee that\n`globalThis.Array` is indeed the default intrinsic reference. Code may break\nunder this flag.\n\nTo allow polyfills to be added,\n[`--require`](#-r---require-module) and [`--import`](#--importmodule) both run before freezing intrinsics.","summary":"Enable experimental frozen intrinsics like `Array` and `Object`.","examples":[],"children":[]},{"kind":"section","id":"--heap-prof","name":"--heap-prof","title":"`--heap-prof`","scope":"module","overloadOf":null,"stability":null,"added":["v12.4.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.4.0","v20.16.0"],"prUrl":"https://github.com/nodejs/node/pull/53343","commit":null,"description":"The `--heap-prof` flags are now stable."}],"description":"Starts the V8 heap profiler on start up, and writes the heap profile to disk\nbefore exit.\n\nIf `--heap-prof-dir` is not specified, the generated profile is placed\nin the current working directory.\n\nIf `--heap-prof-name` is not specified, the generated profile is\nnamed `Heap.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.heapprofile`.\n\n```console\n$ node --heap-prof index.js\n$ ls *.heapprofile\nHeap.20190409.202950.15293.0.001.heapprofile\n```","summary":"Starts the V8 heap profiler on start up, and writes the heap profile to disk before exit.","examples":[{"language":"console","displayName":null,"code":"$ node --heap-prof index.js\n$ ls *.heapprofile\nHeap.20190409.202950.15293.0.001.heapprofile"}],"children":[]},{"kind":"section","id":"--heap-prof-dir","name":"--heap-prof-dir","title":"`--heap-prof-dir`","scope":"module","overloadOf":null,"stability":null,"added":["v12.4.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.4.0","v20.16.0"],"prUrl":"https://github.com/nodejs/node/pull/53343","commit":null,"description":"The `--heap-prof` flags are now stable."}],"description":"Specify the directory where the heap profiles generated by `--heap-prof` will\nbe placed.\n\nThe default value is controlled by the\n[`--diagnostic-dir`](#--diagnostic-dirdirectory) command-line option.","summary":"Specify the directory where the heap profiles generated by `--heap-prof` will be placed.","examples":[],"children":[]},{"kind":"section","id":"--heap-prof-interval","name":"--heap-prof-interval","title":"`--heap-prof-interval`","scope":"module","overloadOf":null,"stability":null,"added":["v12.4.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.4.0","v20.16.0"],"prUrl":"https://github.com/nodejs/node/pull/53343","commit":null,"description":"The `--heap-prof` flags are now stable."}],"description":"Specify the average sampling interval in bytes for the heap profiles generated\nby `--heap-prof`. The default is 512 \\* 1024 bytes.","summary":"Specify the average sampling interval in bytes for the heap profiles generated by `--heap-prof`. The default is 512 * 1024 bytes.","examples":[],"children":[]},{"kind":"section","id":"--heap-prof-name","name":"--heap-prof-name","title":"`--heap-prof-name`","scope":"module","overloadOf":null,"stability":null,"added":["v12.4.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.4.0","v20.16.0"],"prUrl":"https://github.com/nodejs/node/pull/53343","commit":null,"description":"The `--heap-prof` flags are now stable."}],"description":"Specify the file name of the heap profile generated by `--heap-prof`.","summary":"Specify the file name of the heap profile generated by `--heap-prof`.","examples":[],"children":[]},{"kind":"section","id":"--heapsnapshot-near-heap-limitmax_count","name":"--heapsnapshot-near-heap-limit=max_count","title":"`--heapsnapshot-near-heap-limit=max_count`","scope":"module","overloadOf":null,"stability":null,"added":["v15.1.0","v14.18.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v25.4.0","v24.13.1","v22.22.1"],"prUrl":"https://github.com/nodejs/node/pull/60956","commit":null,"description":"The flag is no longer experimental."}],"description":"Writes a V8 heap snapshot to disk when the V8 heap usage is approaching the\nheap limit. `count` should be a non-negative integer (in which case\nNode.js will write no more than `max_count` snapshots to disk).\n\nWhen generating snapshots, garbage collection may be triggered and bring\nthe heap usage down. Therefore multiple snapshots may be written to disk\nbefore the Node.js instance finally runs out of memory. These heap snapshots\ncan be compared to determine what objects are being allocated during the\ntime consecutive snapshots are taken. It's not guaranteed that Node.js will\nwrite exactly `max_count` snapshots to disk, but it will try\nits best to generate at least one and up to `max_count` snapshots before the\nNode.js instance runs out of memory when `max_count` is greater than `0`.\n\nGenerating V8 snapshots takes time and memory (both memory managed by the\nV8 heap and native memory outside the V8 heap). The bigger the heap is,\nthe more resources it needs. Node.js will adjust the V8 heap to accommodate\nthe additional V8 heap memory overhead, and try its best to avoid using up\nall the memory available to the process. When the process uses\nmore memory than the system deems appropriate, the process may be terminated\nabruptly by the system, depending on the system configuration.\n\n```console\n$ node --max-old-space-size=100 --heapsnapshot-near-heap-limit=3 index.js\nWrote snapshot to Heap.20200430.100036.49580.0.001.heapsnapshot\nWrote snapshot to Heap.20200430.100037.49580.0.002.heapsnapshot\nWrote snapshot to Heap.20200430.100038.49580.0.003.heapsnapshot\n\n<--- Last few GCs --->\n\n[49580:0x110000000]     4826 ms: Mark-sweep 130.6 (147.8) -> 130.5 (147.8) MB, 27.4 / 0.0 ms  (average mu = 0.126, current mu = 0.034) allocation failure scavenge might not succeed\n[49580:0x110000000]     4845 ms: Mark-sweep 130.6 (147.8) -> 130.6 (147.8) MB, 18.8 / 0.0 ms  (average mu = 0.088, current mu = 0.031) allocation failure scavenge might not succeed\n\n\n<--- JS stacktrace --->\n\nFATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory\n....\n```","summary":"Writes a V8 heap snapshot to disk when the V8 heap usage is approaching the heap limit. `count` should be a non-negative integer (in which case Node.js will write no more than `max_count` snapshots to disk).","examples":[{"language":"console","displayName":null,"code":"$ node --max-old-space-size=100 --heapsnapshot-near-heap-limit=3 index.js\nWrote snapshot to Heap.20200430.100036.49580.0.001.heapsnapshot\nWrote snapshot to Heap.20200430.100037.49580.0.002.heapsnapshot\nWrote snapshot to Heap.20200430.100038.49580.0.003.heapsnapshot\n\n<--- Last few GCs --->\n\n[49580:0x110000000]     4826 ms: Mark-sweep 130.6 (147.8) -> 130.5 (147.8) MB, 27.4 / 0.0 ms  (average mu = 0.126, current mu = 0.034) allocation failure scavenge might not succeed\n[49580:0x110000000]     4845 ms: Mark-sweep 130.6 (147.8) -> 130.6 (147.8) MB, 18.8 / 0.0 ms  (average mu = 0.088, current mu = 0.031) allocation failure scavenge might not succeed\n\n\n<--- JS stacktrace --->\n\nFATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory\n...."}],"children":[]},{"kind":"section","id":"--heapsnapshot-signalsignal","name":"--heapsnapshot-signal=signal","title":"`--heapsnapshot-signal=signal`","scope":"module","overloadOf":null,"stability":null,"added":["v12.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enables a signal handler that causes the Node.js process to write a heap dump\nwhen the specified signal is received. `signal` must be a valid signal name.\nDisabled by default.\n\n```console\n$ node --heapsnapshot-signal=SIGUSR2 index.js &\n$ ps aux\nUSER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND\nnode         1  5.5  6.1 787252 247004 ?       Ssl  16:43   0:02 node --heapsnapshot-signal=SIGUSR2 index.js\n$ kill -USR2 1\n$ ls\nHeap.20190718.133405.15554.0.001.heapsnapshot\n```","summary":"Enables a signal handler that causes the Node.js process to write a heap dump when the specified signal is received. `signal` must be a valid signal name. Disabled by default.","examples":[{"language":"console","displayName":null,"code":"$ node --heapsnapshot-signal=SIGUSR2 index.js &\n$ ps aux\nUSER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND\nnode         1  5.5  6.1 787252 247004 ?       Ssl  16:43   0:02 node --heapsnapshot-signal=SIGUSR2 index.js\n$ kill -USR2 1\n$ ls\nHeap.20190718.133405.15554.0.001.heapsnapshot"}],"children":[]},{"kind":"section","id":"-help","name":"-h, --help","title":"`-h`, `--help`","scope":"module","overloadOf":null,"stability":null,"added":["v0.1.3"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Print node command-line options.\nThe output of this option is less detailed than this document.","summary":"Print node command-line options. The output of this option is less detailed than this document.","examples":[],"children":[]},{"kind":"section","id":"--icu-data-dirfile","name":"--icu-data-dir=file","title":"`--icu-data-dir=file`","scope":"module","overloadOf":null,"stability":null,"added":["v0.11.15"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Specify ICU data load path. (Overrides `NODE_ICU_DATA`.)","summary":"Specify ICU data load path. (Overrides `NODE_ICU_DATA`.)","examples":[],"children":[]},{"kind":"section","id":"--importmodule","name":"--import=module","title":"`--import=module`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v19.0.0","v18.18.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Preload the specified module at startup. If the flag is provided several times,\neach module will be executed sequentially in the order they appear, starting\nwith the ones provided in [`NODE_OPTIONS`](#node_optionsoptions).\n\nFollows [ECMAScript module](esm.html#modules-ecmascript-modules) resolution rules.\nUse [`--require`](#-r---require-module) to load a [CommonJS module](modules.html).\nModules preloaded with `--require` will run before modules preloaded with `--import`.\n\nModules are preloaded into the main thread as well as any worker threads,\nforked processes, or clustered processes.","summary":"Preload the specified module at startup. If the flag is provided several times, each module will be executed sequentially in the order they appear, starting with the ones provided in `NODE_OPTIONS`.","examples":[],"children":[]},{"kind":"section","id":"--input-typetype","name":"--input-type=type","title":"`--input-type=type`","scope":"module","overloadOf":null,"stability":null,"added":["v12.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v23.6.0","v22.18.0"],"prUrl":"https://github.com/nodejs/node/pull/56350","commit":null,"description":"Add support for `-typescript` values."},{"versions":["v22.7.0","v20.19.0"],"prUrl":"https://github.com/nodejs/node/pull/53619","commit":null,"description":"ESM syntax detection is enabled by default."}],"description":"This configures Node.js to interpret `--eval` or `STDIN` input as CommonJS or\nas an ES module. Valid values are `\"commonjs\"`, `\"module\"`, `\"module-typescript\"` and `\"commonjs-typescript\"`.\nThe `\"-typescript\"` values are not available with the flag `--no-strip-types`.\nThe default is no value, or `\"commonjs\"` if `--no-experimental-detect-module` is passed.\n\nIf `--input-type` is not provided,\nNode.js will try to detect the syntax with the following steps:\n\n1. Run the input as CommonJS.\n2. If step 1 fails, run the input as an ES module.\n3. If step 2 fails with a SyntaxError, strip the types.\n4. If step 3 fails with an error code [`ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX`](errors.html#err_unsupported_typescript_syntax)\n   or [`ERR_INVALID_TYPESCRIPT_SYNTAX`](errors.html#err_invalid_typescript_syntax),\n   throw the error from step 2, including the TypeScript error in the message,\n   else run as CommonJS.\n5. If step 4 fails, run the input as an ES module.\n\nTo avoid the delay of multiple syntax detection passes, the `--input-type=type` flag can be used to specify\nhow the `--eval` input should be interpreted.\n\nThe REPL does not support this option. Usage of `--input-type=module` with\n[`--print`](#-p---print-script) will throw an error, as `--print` does not support ES module\nsyntax.","summary":"This configures Node.js to interpret `--eval` or `STDIN` input as CommonJS or as an ES module. Valid values are `\"commonjs\"`, `\"module\"`, `\"module-typescript\"` and `\"commonjs-typescript\"`. The `\"-typescript\"` values are not available with the flag `--no-strip-types`. The default is no value, or `\"commonjs\"` if `--no-experimental-detect-module` is passed.","examples":[],"children":[]},{"kind":"section","id":"--insecure-http-parser","name":"--insecure-http-parser","title":"`--insecure-http-parser`","scope":"module","overloadOf":null,"stability":null,"added":["v13.4.0","v12.15.0","v10.19.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable leniency flags on the HTTP parser. This may allow\ninteroperability with non-conformant HTTP implementations.\n\nWhen enabled, the parser will accept the following:\n\n* Invalid HTTP headers values.\n* Invalid HTTP versions.\n* Allow message containing both `Transfer-Encoding`\n  and `Content-Length` headers.\n* Allow extra data after message when `Connection: close` is present.\n* Allow extra transfer encodings after `chunked` has been provided.\n* Allow `\\n` to be used as token separator instead of `\\r\\n`.\n* Allow `\\r\\n` not to be provided after a chunk.\n* Allow spaces to be present after a chunk size and before `\\r\\n`.\n\nAll the above will expose your application to request smuggling\nor poisoning attack. Avoid using this option.","summary":"Enable leniency flags on the HTTP parser. This may allow interoperability with non-conformant HTTP implementations.","examples":[],"children":[]},{"kind":"section","id":"--inspect-brkhostport","name":"--inspect-brk[=[host:]port]","title":"`--inspect-brk[=[host:]port]`","scope":"module","overloadOf":null,"stability":null,"added":["v7.6.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Activate inspector on `host:port` and break at start of user script.\nDefault `host:port` is `127.0.0.1:9229`. If port `0` is specified,\na random available port will be used.\n\nSee [V8 Inspector integration for Node.js](debugger.html#v8-inspector-integration-for-nodejs) for further explanation on Node.js debugger.\n\nSee the [security warning](#warning-binding-inspector-to-a-public-ipport-combination-is-insecure) below regarding the `host`\nparameter usage.","summary":"Activate inspector on `host:port` and break at start of user script. Default `host:port` is `127.0.0.1:9229`. If port `0` is specified, a random available port will be used.","examples":[],"children":[]},{"kind":"section","id":"--inspect-porthostport","name":"--inspect-port=[host:]port","title":"`--inspect-port=[host:]port`","scope":"module","overloadOf":null,"stability":null,"added":["v7.6.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Set the `host:port` to be used when the inspector is activated.\nUseful when activating the inspector by sending the `SIGUSR1` signal.\nExcept when [`--disable-sigusr1`](#--disable-sigusr1) is passed.\n\nDefault host is `127.0.0.1`. If port `0` is specified,\na random available port will be used.\n\nSee the [security warning](#warning-binding-inspector-to-a-public-ipport-combination-is-insecure) below regarding the `host`\nparameter usage.","summary":"Set the `host:port` to be used when the inspector is activated. Useful when activating the inspector by sending the `SIGUSR1` signal. Except when `--disable-sigusr1` is passed.","examples":[],"children":[]},{"kind":"section","id":"--inspect-publish-uidstderrhttp","name":"--inspect-publish-uid=stderr,http","title":"`--inspect-publish-uid=stderr,http`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Specify ways of the inspector web socket url exposure.\n\nBy default inspector websocket url is available in stderr and under `/json/list`\nendpoint on `http://host:port/json/list`.","summary":"Specify ways of the inspector web socket url exposure.","examples":[],"children":[]},{"kind":"section","id":"--inspect-waithostport","name":"--inspect-wait[=[host:]port]","title":"`--inspect-wait[=[host:]port]`","scope":"module","overloadOf":null,"stability":null,"added":["v22.2.0","v20.15.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Activate inspector on `host:port` and wait for debugger to be attached.\nDefault `host:port` is `127.0.0.1:9229`. If port `0` is specified,\na random available port will be used.\n\nSee [V8 Inspector integration for Node.js](debugger.html#v8-inspector-integration-for-nodejs) for further explanation on Node.js debugger.\n\nSee the [security warning](#warning-binding-inspector-to-a-public-ipport-combination-is-insecure) below regarding the `host`\nparameter usage.","summary":"Activate inspector on `host:port` and wait for debugger to be attached. Default `host:port` is `127.0.0.1:9229`. If port `0` is specified, a random available port will be used.","examples":[],"children":[]},{"kind":"section","id":"--inspecthostport","name":"--inspect[=[host:]port]","title":"`--inspect[=[host:]port]`","scope":"module","overloadOf":null,"stability":null,"added":["v6.3.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Activate inspector on `host:port`. Default is `127.0.0.1:9229`. If port `0` is\nspecified, a random available port will be used.\n\nV8 inspector integration allows tools such as Chrome DevTools and IDEs to debug\nand profile Node.js instances. The tools attach to Node.js instances via a\ntcp port and communicate using the [Chrome DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/).\nSee [V8 Inspector integration for Node.js](debugger.html#v8-inspector-integration-for-nodejs) for further explanation on Node.js debugger.\n\n<a id=\"inspector_security\"></a>","summary":"Activate inspector on `host:port`. Default is `127.0.0.1:9229`. If port `0` is specified, a random available port will be used.","examples":[],"children":[{"kind":"section","id":"warning-binding-inspector-to-a-public-ipport-combination-is-insecure","name":"Warning: binding inspector to a public IP:port combination is insecure","title":"Warning: binding inspector to a public IP:port combination is insecure","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Binding the inspector to a public IP (including `0.0.0.0`) with an open port is\ninsecure, as it allows external hosts to connect to the inspector and perform\na [remote code execution](https://www.owasp.org/index.php/Code_Injection) attack.\n\nIf specifying a host, make sure that either:\n\n* The host is not accessible from public networks.\n* A firewall disallows unwanted connections on the port.\n\n**More specifically, `--inspect=0.0.0.0` is insecure if the port (`9229` by\ndefault) is not firewall-protected.**\n\nSee the [debugging security implications](https://nodejs.org/learn/getting-started/debugging#security-implications) section for more information.","summary":"Binding the inspector to a public IP (including `0.0.0.0`) with an open port is insecure, as it allows external hosts to connect to the inspector and perform a remote code execution attack.","examples":[],"children":[]}]},{"kind":"section","id":"-interactive","name":"-i, --interactive","title":"`-i`, `--interactive`","scope":"module","overloadOf":null,"stability":null,"added":["v0.7.7"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Opens the REPL even if stdin does not appear to be a terminal.","summary":"Opens the REPL even if stdin does not appear to be a terminal.","examples":[],"children":[]},{"kind":"section","id":"--jitless","name":"--jitless","title":"`--jitless`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental. This flag is inherited from V8 and is subject to\nchange upstream."},"added":["v12.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Disable [runtime allocation of executable memory](https://v8.dev/blog/jitless). This may be\nrequired on some platforms for security reasons. It can also reduce attack\nsurface on other platforms, but the performance impact may be severe.","summary":"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.","examples":[],"children":[]},{"kind":"section","id":"--localstorage-filefile","name":"--localstorage-file=file","title":"`--localstorage-file=file`","scope":"module","overloadOf":null,"stability":{"index":"1.2","description":"Release candidate."},"added":["v22.4.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The file used to store `localStorage` data. If the file does not exist, it is\ncreated the first time `localStorage` is accessed. The same file may be shared\nbetween multiple Node.js processes concurrently.","summary":"The file used to store `localStorage` data. If the file does not exist, it is created the first time `localStorage` is accessed. The same file may be shared between multiple Node.js processes concurrently.","examples":[],"children":[]},{"kind":"section","id":"--max-http-header-sizesize","name":"--max-http-header-size=size","title":"`--max-http-header-size=size`","scope":"module","overloadOf":null,"stability":null,"added":["v11.6.0","v10.15.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v13.13.0"],"prUrl":"https://github.com/nodejs/node/pull/32520","commit":null,"description":"Change maximum default size of HTTP headers from 8 KiB to 16 KiB."}],"description":"Specify the maximum size, in bytes, of HTTP headers. Defaults to 16 KiB.","summary":"Specify the maximum size, in bytes, of HTTP headers. Defaults to 16 KiB.","examples":[],"children":[]},{"kind":"section","id":"--max-old-space-size-percentagepercentage","name":"--max-old-space-size-percentage=percentage","title":"`--max-old-space-size-percentage=percentage`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Sets the maximum memory size of V8's old memory section as a percentage of available system memory.\nThis flag takes precedence over `--max-old-space-size` when both are specified.\n\nThe `percentage` parameter must be a number greater than 0 and up to 100, representing the percentage\nof available system memory to allocate to the V8 heap.\n\n**Note:** This flag utilizes `--max-old-space-size`, which may be unreliable on 32-bit platforms due to\ninteger overflow issues.\n\n```bash\n# Using 50% of available system memory\nnode --max-old-space-size-percentage=50 index.js\n\n# Using 75% of available system memory\nnode --max-old-space-size-percentage=75 index.js\n```","summary":"Sets the maximum memory size of V8's old memory section as a percentage of available system memory. This flag takes precedence over `--max-old-space-size` when both are specified.","examples":[{"language":"bash","displayName":null,"code":"# Using 50% of available system memory\nnode --max-old-space-size-percentage=50 index.js\n\n# Using 75% of available system memory\nnode --max-old-space-size-percentage=75 index.js"}],"children":[]},{"kind":"section","id":"--network-family-autoselection-attempt-timeout","name":"--network-family-autoselection-attempt-timeout","title":"`--network-family-autoselection-attempt-timeout`","scope":"module","overloadOf":null,"stability":null,"added":["v22.1.0","v20.13.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Sets the default value for the network family autoselection attempt timeout.\nFor more information, see [`net.getDefaultAutoSelectFamilyAttemptTimeout()`](net.html#netgetdefaultautoselectfamilyattempttimeout).","summary":"Sets the default value for the network family autoselection attempt timeout. For more information, see `net.getDefaultAutoSelectFamilyAttemptTimeout()`.","examples":[],"children":[]},{"kind":"section","id":"--no-addons","name":"--no-addons","title":"`--no-addons`","scope":"module","overloadOf":null,"stability":null,"added":["v16.10.0","v14.19.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Disable the `node-addons` exports condition as well as disable loading\nnative addons. When `--no-addons` is specified, calling `process.dlopen` or\nrequiring a native C++ addon will fail and throw an exception.","summary":"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.","examples":[],"children":[]},{"kind":"section","id":"--no-async-context-frame","name":"--no-async-context-frame","title":"`--no-async-context-frame`","scope":"module","overloadOf":null,"stability":null,"added":["v24.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Disables the use of [`AsyncLocalStorage`](async_context.html#class-asynclocalstorage) backed by `AsyncContextFrame` and\nuses the prior implementation which relied on async\\_hooks. The previous model\nis retained for compatibility with Electron and for cases where the context\nflow may differ. However, if a difference in flow is found please report it.","summary":"Disables the use of `AsyncLocalStorage` backed by `AsyncContextFrame` and uses the prior implementation which relied on async_hooks. The previous model is retained for compatibility with Electron and for cases where the context flow may differ. However, if a difference in flow is found please report it.","examples":[],"children":[]},{"kind":"section","id":"--no-deprecation","name":"--no-deprecation","title":"`--no-deprecation`","scope":"module","overloadOf":null,"stability":null,"added":["v0.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Silence deprecation warnings.","summary":"Silence deprecation warnings.","examples":[],"children":[]},{"kind":"section","id":"--no-experimental-detect-module","name":"--no-experimental-detect-module","title":"`--no-experimental-detect-module`","scope":"module","overloadOf":null,"stability":null,"added":["v21.1.0","v20.10.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.7.0","v20.19.0"],"prUrl":"https://github.com/nodejs/node/pull/53619","commit":null,"description":"Syntax detection is enabled by default."}],"description":"Disable using [syntax detection](packages.html#syntax-detection) to determine module type.","summary":"Disable using syntax detection to determine module type.","examples":[],"children":[]},{"kind":"section","id":"--no-experimental-global-navigator","name":"--no-experimental-global-navigator","title":"`--no-experimental-global-navigator`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v21.2.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Disable exposition of [Navigator API](globals.html#navigator) on the global scope.","summary":"Disable exposition of Navigator API on the global scope.","examples":[],"children":[]},{"kind":"section","id":"--no-experimental-repl-await","name":"--no-experimental-repl-await","title":"`--no-experimental-repl-await`","scope":"module","overloadOf":null,"stability":null,"added":["v16.6.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Use this flag to disable top-level await in REPL.","summary":"Use this flag to disable top-level await in REPL.","examples":[],"children":[]},{"kind":"section","id":"--no-experimental-require-module","name":"--no-experimental-require-module","title":"`--no-experimental-require-module`","scope":"module","overloadOf":null,"stability":{"index":"3","description":"Legacy: Use [`--no-require-module`](#--no-require-module) instead."},"added":["v22.0.0","v20.17.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v25.4.0"],"prUrl":"https://github.com/nodejs/node/pull/60959","commit":null,"description":"The flag was renamed from `--no-experimental-require-module` to `--no-require-module`, with the former marked as legacy."},{"versions":["v23.0.0","v22.12.0","v20.19.0"],"prUrl":"https://github.com/nodejs/node/pull/55085","commit":null,"description":"This is now false by default."}],"description":"Legacy alias for [`--no-require-module`](#--no-require-module).","summary":"Legacy alias for `--no-require-module`.","examples":[],"children":[]},{"kind":"section","id":"--no-experimental-sqlite","name":"--no-experimental-sqlite","title":"`--no-experimental-sqlite`","scope":"module","overloadOf":null,"stability":null,"added":["v22.5.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v23.4.0","v22.13.0"],"prUrl":"https://github.com/nodejs/node/pull/55890","commit":null,"description":"SQLite is unflagged but still experimental."}],"description":"Disable the experimental [`node:sqlite`](sqlite.html) module.","summary":"Disable the experimental `node:sqlite` module.","examples":[],"children":[]},{"kind":"section","id":"--no-experimental-websocket","name":"--no-experimental-websocket","title":"`--no-experimental-websocket`","scope":"module","overloadOf":null,"stability":null,"added":["v22.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Disable exposition of {WebSocket} on the global scope.","summary":"Disable exposition of {WebSocket} on the global scope.","examples":[],"children":[]},{"kind":"section","id":"--no-experimental-webstorage","name":"--no-experimental-webstorage","title":"`--no-experimental-webstorage`","scope":"module","overloadOf":null,"stability":{"index":"1.2","description":"Release candidate."},"added":["v22.4.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v25.0.0"],"prUrl":"https://github.com/nodejs/node/pull/57666","commit":null,"description":"The feature is now enabled by default."}],"description":"Disable [`Web Storage`](https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API) support.","summary":"Disable `Web Storage` support.","examples":[],"children":[]},{"kind":"section","id":"--no-extra-info-on-fatal-exception","name":"--no-extra-info-on-fatal-exception","title":"`--no-extra-info-on-fatal-exception`","scope":"module","overloadOf":null,"stability":null,"added":["v17.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Hide extra information on fatal exception that causes exit.","summary":"Hide extra information on fatal exception that causes exit.","examples":[],"children":[]},{"kind":"section","id":"--no-force-async-hooks-checks","name":"--no-force-async-hooks-checks","title":"`--no-force-async-hooks-checks`","scope":"module","overloadOf":null,"stability":null,"added":["v9.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Disables runtime checks for `async_hooks`. These will still be enabled\ndynamically when `async_hooks` is enabled.","summary":"Disables runtime checks for `async_hooks`. These will still be enabled dynamically when `async_hooks` is enabled.","examples":[],"children":[]},{"kind":"section","id":"--no-global-search-paths","name":"--no-global-search-paths","title":"`--no-global-search-paths`","scope":"module","overloadOf":null,"stability":null,"added":["v16.10.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Do not search modules from global paths like `$HOME/.node_modules` and\n`$NODE_PATH`.","summary":"Do not search modules from global paths like `$HOME/.node_modules` and `$NODE_PATH`.","examples":[],"children":[]},{"kind":"section","id":"--no-network-family-autoselection","name":"--no-network-family-autoselection","title":"`--no-network-family-autoselection`","scope":"module","overloadOf":null,"stability":null,"added":["v19.4.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v20.0.0"],"prUrl":"https://github.com/nodejs/node/pull/46790","commit":null,"description":"The flag was renamed from `--no-enable-network-family-autoselection` to `--no-network-family-autoselection`. The old name can still work as an alias."}],"description":"Disables the family autoselection algorithm unless connection options explicitly\nenables it.\n\n<a id=\"--experimental-require-module\"></a>","summary":"Disables the family autoselection algorithm unless connection options explicitly enables it.","examples":[],"children":[]},{"kind":"section","id":"--no-require-module","name":"--no-require-module","title":"`--no-require-module`","scope":"module","overloadOf":null,"stability":null,"added":["v22.0.0","v20.17.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v25.4.0"],"prUrl":"https://github.com/nodejs/node/pull/60959","commit":null,"description":"This flag is no longer experimental."},{"versions":["v25.4.0"],"prUrl":"https://github.com/nodejs/node/pull/60959","commit":null,"description":"This flag was renamed from `--no-experimental-require-module` to `--no-require-module`."},{"versions":["v23.0.0","v22.12.0","v20.19.0"],"prUrl":"https://github.com/nodejs/node/pull/55085","commit":null,"description":"This is now false by default."}],"description":"Disable support for loading a synchronous ES module graph in `require()`.\n\nSee [Loading ECMAScript modules using `require()`](modules.html#loading-ecmascript-modules-using-require).","summary":"Disable support for loading a synchronous ES module graph in `require()`.","examples":[],"children":[]},{"kind":"section","id":"--no-strip-types","name":"--no-strip-types","title":"`--no-strip-types`","scope":"module","overloadOf":null,"stability":null,"added":["v22.6.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v25.2.0","v24.12.0"],"prUrl":"https://github.com/nodejs/node/pull/60600","commit":null,"description":"Type stripping is now stable, the flag was renamed from `--no-experimental-strip-types` to `--no-strip-types`."},{"versions":["v23.6.0","v22.18.0"],"prUrl":"https://github.com/nodejs/node/pull/56350","commit":null,"description":"Type stripping is enabled by default."}],"description":"Disable type-stripping for TypeScript files.\nFor more information, see the [TypeScript type-stripping](typescript.html#type-stripping) documentation.","summary":"Disable type-stripping for TypeScript files. For more information, see the TypeScript type-stripping documentation.","examples":[],"children":[]},{"kind":"section","id":"--no-warnings","name":"--no-warnings","title":"`--no-warnings`","scope":"module","overloadOf":null,"stability":null,"added":["v6.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Silence all process warnings (including deprecations).","summary":"Silence all process warnings (including deprecations).","examples":[],"children":[]},{"kind":"section","id":"--node-memory-debug","name":"--node-memory-debug","title":"`--node-memory-debug`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0","v14.18.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable extra debug checks for memory leaks in Node.js internals. This is\nusually only useful for developers debugging Node.js itself.","summary":"Enable extra debug checks for memory leaks in Node.js internals. This is usually only useful for developers debugging Node.js itself.","examples":[],"children":[]},{"kind":"section","id":"--openssl-configfile","name":"--openssl-config=file","title":"`--openssl-config=file`","scope":"module","overloadOf":null,"stability":null,"added":["v6.9.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Load an OpenSSL configuration file on startup. The file can activate an\nOpenSSL 3 FIPS provider or configure a FIPS-capable OpenSSL 1.1.1 build. See\n[FIPS mode](crypto.html#fips-mode).\n\nThis option takes precedence over the `OPENSSL_CONF` environment variable.","summary":"Load an OpenSSL configuration file on startup. The file can activate an OpenSSL 3 FIPS provider or configure a FIPS-capable OpenSSL 1.1.1 build. See FIPS mode.","examples":[],"children":[]},{"kind":"section","id":"--openssl-legacy-provider","name":"--openssl-legacy-provider","title":"`--openssl-legacy-provider`","scope":"module","overloadOf":null,"stability":null,"added":["v17.0.0","v16.17.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable OpenSSL 3.0 legacy provider. For more information please see\n[OSSL\\_PROVIDER-legacy](https://www.openssl.org/docs/man3.0/man7/OSSL_PROVIDER-legacy.html).","summary":"Enable OpenSSL 3.0 legacy provider. For more information please see OSSL_PROVIDER-legacy.","examples":[],"children":[]},{"kind":"section","id":"--openssl-shared-config","name":"--openssl-shared-config","title":"`--openssl-shared-config`","scope":"module","overloadOf":null,"stability":null,"added":["v18.5.0","v16.17.0","v14.21.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable OpenSSL default configuration section, `openssl_conf` to be read from\nthe OpenSSL configuration file. The default configuration file is named\n`openssl.cnf` but this can be changed using the environment variable\n`OPENSSL_CONF`, or by using the command line option `--openssl-config`.\nThe location of the default OpenSSL configuration file depends on how OpenSSL\nis being linked to Node.js. Sharing the OpenSSL configuration may have unwanted\nimplications and it is recommended to use a configuration section specific to\nNode.js which is `nodejs_conf` and is default when this option is not used.","summary":"Enable OpenSSL default configuration section, `openssl_conf` to be read from the OpenSSL configuration file. The default configuration file is named `openssl.cnf` but this can be changed using the environment variable `OPENSSL_CONF`, or by using the command line option `--openssl-config`. The location of the default OpenSSL configuration file depends on how OpenSSL is being linked to Node.js. Sharing the OpenSSL configuration may have unwanted implications and it is recommended to use a configuration section specific to Node.js which is `nodejs_conf` and is default when this option is not used.","examples":[],"children":[]},{"kind":"section","id":"--pending-deprecation","name":"--pending-deprecation","title":"`--pending-deprecation`","scope":"module","overloadOf":null,"stability":null,"added":["v8.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Emit pending deprecation warnings.\n\nPending deprecations are generally identical to a runtime deprecation with the\nnotable exception that they are turned *off* by default and will not be emitted\nunless either the `--pending-deprecation` command-line flag, or the\n`NODE_PENDING_DEPRECATION=1` environment variable, is set. Pending deprecations\nare used to provide a kind of selective \"early warning\" mechanism that\ndevelopers may leverage to detect deprecated API usage.","summary":"Emit pending deprecation warnings.","examples":[],"children":[]},{"kind":"section","id":"--permission","name":"--permission","title":"`--permission`","scope":"module","overloadOf":null,"stability":null,"added":["v20.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v23.5.0","v22.13.0"],"prUrl":"https://github.com/nodejs/node/pull/56201","commit":null,"description":"Permission Model is now stable."}],"description":"Enable the Permission Model for current process. When enabled, the\nfollowing permissions are restricted:\n\n> See also [`--permission-audit`](#--permission-audit) for an audit-only mode\n> that logs violations without denying access.\n\n* File System - manageable through\n  [`--allow-fs-read`](#--allow-fs-read), [`--allow-fs-write`](#--allow-fs-write) flags\n* Network - manageable through [`--allow-net`](#--allow-net) flag\n* Child Process - manageable through [`--allow-child-process`](#--allow-child-process) flag\n* Worker Threads - manageable through [`--allow-worker`](#--allow-worker) flag\n* WASI - manageable through [`--allow-wasi`](#--allow-wasi) flag\n* Addons - manageable through [`--allow-addons`](#--allow-addons) flag\n* FFI - manageable through [`--allow-ffi`](#--allow-ffi) flag\n* OpenSSL STORE loaders - manageable through [`--allow-openssl-store`](#--allow-openssl-store) flag","summary":"Enable the Permission Model for current process. When enabled, the following permissions are restricted:","examples":[],"children":[]},{"kind":"section","id":"--permission-audit","name":"--permission-audit","title":"`--permission-audit`","scope":"module","overloadOf":null,"stability":null,"added":["v25.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enable audit mode for the permission model. When enabled, permission checks\nare performed but access is **not** denied — no `ERR_ACCESS_DENIED` error is\nthrown. Instead, each permission violation is published through the\n`node:diagnostics_channel` module, and execution continues normally.\n\nThis flag does not require [`--permission`](#--permission) to be specified. The\n`--allow-*` flags are not needed in audit mode, since no\naccess is denied.\n\nAudit mode is useful for discovering what permissions your application\nrequires before deploying with [`--permission`](#--permission). See the\n[Permission Model](permissions.html#permission-model) documentation for the list of diagnostics channel names\nand the message format.\n\nIf both [`--permission`](#--permission) and `--permission-audit` are specified,\n`--permission` takes precedence and the Permission Model runs in enforce mode.","summary":"Enable audit mode for the permission model. When enabled, permission checks are performed but access is **not** denied — no `ERR_ACCESS_DENIED` error is thrown. Instead, each permission violation is published through the `node:diagnostics_channel` module, and execution continues normally.","examples":[],"children":[]},{"kind":"section","id":"--preserve-symlinks","name":"--preserve-symlinks","title":"`--preserve-symlinks`","scope":"module","overloadOf":null,"stability":null,"added":["v6.3.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Instructs the module loader to preserve symbolic links when resolving and\ncaching modules.\n\nBy default, when Node.js loads a module from a path that is symbolically linked\nto a different on-disk location, Node.js will dereference the link and use the\nactual on-disk \"real path\" of the module as both an identifier and as a root\npath to locate other dependency modules. In most cases, this default behavior\nis acceptable. However, when using symbolically linked peer dependencies, as\nillustrated in the example below, the default behavior causes an exception to\nbe thrown if `moduleA` attempts to require `moduleB` as a peer dependency:\n\n```text\n{appDir}\n ├── app\n │   ├── index.js\n │   └── node_modules\n │       ├── moduleA -> {appDir}/moduleA\n │       └── moduleB\n │           ├── index.js\n │           └── package.json\n └── moduleA\n     ├── index.js\n     └── package.json\n```\n\nThe `--preserve-symlinks` command-line flag instructs Node.js to use the\nsymlink path for modules as opposed to the real path, allowing symbolically\nlinked peer dependencies to be found.\n\nNote, however, that using `--preserve-symlinks` can have other side effects.\nSpecifically, symbolically linked *native* modules can fail to load if those\nare linked from more than one location in the dependency tree (Node.js would\nsee those as two separate modules and would attempt to load the module multiple\ntimes, causing an exception to be thrown).\n\nThe `--preserve-symlinks` flag does not apply to the main module, which allows\n`node --preserve-symlinks node_module/.bin/<foo>` to work. To apply the same\nbehavior for the main module, also use `--preserve-symlinks-main`.","summary":"Instructs the module loader to preserve symbolic links when resolving and caching modules.","examples":[{"language":"text","displayName":null,"code":"{appDir}\n ├── app\n │   ├── index.js\n │   └── node_modules\n │       ├── moduleA -> {appDir}/moduleA\n │       └── moduleB\n │           ├── index.js\n │           └── package.json\n └── moduleA\n     ├── index.js\n     └── package.json"}],"children":[]},{"kind":"section","id":"--preserve-symlinks-main","name":"--preserve-symlinks-main","title":"`--preserve-symlinks-main`","scope":"module","overloadOf":null,"stability":null,"added":["v10.2.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Instructs the module loader to preserve symbolic links when resolving and\ncaching the main module (`require.main`).\n\nThis flag exists so that the main module can be opted-in to the same behavior\nthat `--preserve-symlinks` gives to all other imports; they are separate flags,\nhowever, for backward compatibility with older Node.js versions.\n\n`--preserve-symlinks-main` does not imply `--preserve-symlinks`; use\n`--preserve-symlinks-main` in addition to\n`--preserve-symlinks` when it is not desirable to follow symlinks before\nresolving relative paths.\n\nSee [`--preserve-symlinks`](#--preserve-symlinks) for more information.","summary":"Instructs the module loader to preserve symbolic links when resolving and caching the main module (`require.main`).","examples":[],"children":[]},{"kind":"section","id":"-print-script","name":"-p, --print \"script\"","title":"`-p`, `--print \"script\"`","scope":"module","overloadOf":null,"stability":null,"added":["v0.6.4"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v5.11.0"],"prUrl":"https://github.com/nodejs/node/pull/5348","commit":null,"description":"Built-in libraries are now available as predefined variables."}],"description":"Identical to `-e` but prints the result.","summary":"Identical to `-e` but prints the result.","examples":[],"children":[]},{"kind":"section","id":"--prof","name":"--prof","title":"`--prof`","scope":"module","overloadOf":null,"stability":null,"added":["v2.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Generate V8 profiler output.","summary":"Generate V8 profiler output.","examples":[],"children":[]},{"kind":"section","id":"--prof-process","name":"--prof-process","title":"`--prof-process`","scope":"module","overloadOf":null,"stability":null,"added":["v5.2.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Process V8 profiler output generated using the V8 option `--prof`.","summary":"Process V8 profiler output generated using the V8 option `--prof`.","examples":[],"children":[]},{"kind":"section","id":"--redirect-warningsfile","name":"--redirect-warnings=file","title":"`--redirect-warnings=file`","scope":"module","overloadOf":null,"stability":null,"added":["v8.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Write process warnings to the given file instead of printing to stderr. The\nfile will be created if it does not exist, and will be appended to if it does.\nIf an error occurs while attempting to write the warning to the file, the\nwarning will be written to stderr instead.\n\nThe `file` name may be an absolute path. If it is not, the default directory it\nwill be written to is controlled by the\n[`--diagnostic-dir`](#--diagnostic-dirdirectory) command-line option.","summary":"Write process warnings to the given file instead of printing to stderr. The file will be created if it does not exist, and will be appended to if it does. If an error occurs while attempting to write the warning to the file, the warning will be written to stderr instead.","examples":[],"children":[]},{"kind":"section","id":"--report-compact","name":"--report-compact","title":"`--report-compact`","scope":"module","overloadOf":null,"stability":null,"added":["v13.12.0","v12.17.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Write reports in a compact format, single-line JSON, more easily consumable\nby log processing systems than the default multi-line format designed for\nhuman consumption.","summary":"Write reports in a compact format, single-line JSON, more easily consumable by log processing systems than the default multi-line format designed for human consumption.","examples":[],"children":[]},{"kind":"section","id":"--report-dirdirectory---report-directorydirectory","name":"--report-dir=directory, --report-directory=directory","title":"`--report-dir=directory`, `--report-directory=directory`","scope":"module","overloadOf":null,"stability":null,"added":["v11.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v13.12.0","v12.17.0"],"prUrl":"https://github.com/nodejs/node/pull/32242","commit":null,"description":"This option is no longer experimental."},{"versions":["v12.0.0"],"prUrl":"https://github.com/nodejs/node/pull/27312","commit":null,"description":"Changed from `--diagnostic-report-directory` to `--report-directory`."}],"description":"Location at which the report will be generated.","summary":"Location at which the report will be generated.","examples":[],"children":[]},{"kind":"section","id":"--report-exclude-env","name":"--report-exclude-env","title":"`--report-exclude-env`","scope":"module","overloadOf":null,"stability":null,"added":["v23.3.0","v22.13.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When `--report-exclude-env` is passed the diagnostic report generated will not\ncontain the `environmentVariables` data.","summary":"When `--report-exclude-env` is passed the diagnostic report generated will not contain the `environmentVariables` data.","examples":[],"children":[]},{"kind":"section","id":"--report-exclude-network","name":"--report-exclude-network","title":"`--report-exclude-network`","scope":"module","overloadOf":null,"stability":null,"added":["v22.0.0","v20.13.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Exclude `header.networkInterfaces` from the diagnostic report. By default\nthis is not set and the network interfaces are included.","summary":"Exclude `header.networkInterfaces` from the diagnostic report. By default this is not set and the network interfaces are included.","examples":[],"children":[]},{"kind":"section","id":"--report-filenamefilename","name":"--report-filename=filename","title":"`--report-filename=filename`","scope":"module","overloadOf":null,"stability":null,"added":["v11.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v13.12.0","v12.17.0"],"prUrl":"https://github.com/nodejs/node/pull/32242","commit":null,"description":"This option is no longer experimental."},{"versions":["v12.0.0"],"prUrl":"https://github.com/nodejs/node/pull/27312","commit":null,"description":"changed from `--diagnostic-report-filename` to `--report-filename`."}],"description":"Name of the file to which the report will be written.\n\nIf the filename is set to `'stdout'` or `'stderr'`, the report is written to\nthe stdout or stderr of the process respectively.","summary":"Name of the file to which the report will be written.","examples":[],"children":[]},{"kind":"section","id":"--report-on-fatalerror","name":"--report-on-fatalerror","title":"`--report-on-fatalerror`","scope":"module","overloadOf":null,"stability":null,"added":["v11.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v14.0.0","v13.14.0","v12.17.0"],"prUrl":"https://github.com/nodejs/node/pull/32496","commit":null,"description":"This option is no longer experimental."},{"versions":["v12.0.0"],"prUrl":"https://github.com/nodejs/node/pull/27312","commit":null,"description":"changed from `--diagnostic-report-on-fatalerror` to `--report-on-fatalerror`."}],"description":"Enables the report to be triggered on fatal errors (internal errors within\nthe Node.js runtime such as out of memory) that lead to termination of the\napplication. Useful to inspect various diagnostic data elements such as heap,\nstack, event loop state, resource consumption etc. to reason about the fatal\nerror.","summary":"Enables the report to be triggered on fatal errors (internal errors within the Node.js runtime such as out of memory) that lead 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.","examples":[],"children":[]},{"kind":"section","id":"--report-on-signal","name":"--report-on-signal","title":"`--report-on-signal`","scope":"module","overloadOf":null,"stability":null,"added":["v11.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v13.12.0","v12.17.0"],"prUrl":"https://github.com/nodejs/node/pull/32242","commit":null,"description":"This option is no longer experimental."},{"versions":["v12.0.0"],"prUrl":"https://github.com/nodejs/node/pull/27312","commit":null,"description":"changed from `--diagnostic-report-on-signal` to `--report-on-signal`."}],"description":"Enables report to be generated upon receiving the specified (or predefined)\nsignal to the running Node.js process. The signal to trigger the report is\nspecified through `--report-signal`.","summary":"Enables report to be generated upon receiving the specified (or predefined) signal to the running Node.js process. The signal to trigger the report is specified through `--report-signal`.","examples":[],"children":[]},{"kind":"section","id":"--report-signalsignal","name":"--report-signal=signal","title":"`--report-signal=signal`","scope":"module","overloadOf":null,"stability":null,"added":["v11.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v13.12.0","v12.17.0"],"prUrl":"https://github.com/nodejs/node/pull/32242","commit":null,"description":"This option is no longer experimental."},{"versions":["v12.0.0"],"prUrl":"https://github.com/nodejs/node/pull/27312","commit":null,"description":"changed from `--diagnostic-report-signal` to `--report-signal`."}],"description":"Sets or resets the signal for report generation (not supported on Windows).\nDefault signal is `SIGUSR2`.","summary":"Sets or resets the signal for report generation (not supported on Windows). Default signal is `SIGUSR2`.","examples":[],"children":[]},{"kind":"section","id":"--report-uncaught-exception","name":"--report-uncaught-exception","title":"`--report-uncaught-exception`","scope":"module","overloadOf":null,"stability":null,"added":["v11.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v18.8.0","v16.18.0"],"prUrl":"https://github.com/nodejs/node/pull/44208","commit":null,"description":"Report is not generated if the uncaught exception is handled."},{"versions":["v13.12.0","v12.17.0"],"prUrl":"https://github.com/nodejs/node/pull/32242","commit":null,"description":"This option is no longer experimental."},{"versions":["v12.0.0"],"prUrl":"https://github.com/nodejs/node/pull/27312","commit":null,"description":"changed from `--diagnostic-report-uncaught-exception` to `--report-uncaught-exception`."}],"description":"Enables report to be generated when the process exits due to an uncaught\nexception. Useful when inspecting the JavaScript stack in conjunction with\nnative stack and other runtime environment data.","summary":"Enables report to be generated when the process exits due to an uncaught exception. Useful when inspecting the JavaScript stack in conjunction with native stack and other runtime environment data.","examples":[],"children":[]},{"kind":"section","id":"-require-module","name":"-r, --require module","title":"`-r`, `--require module`","scope":"module","overloadOf":null,"stability":null,"added":["v1.6.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v23.0.0","v22.12.0","v20.19.0"],"prUrl":"https://github.com/nodejs/node/pull/51977","commit":null,"description":"This option also supports ECMAScript module."}],"description":"Preload the specified module at startup.\n\nFollows `require()`'s module resolution\nrules. `module` may be either a path to a file, or a node module name.\n\nModules preloaded with `--require` will run before modules preloaded with `--import`.\n\nModules are preloaded into the main thread as well as any worker threads,\nforked processes, or clustered processes.","summary":"Preload the specified module at startup.","examples":[],"children":[]},{"kind":"section","id":"--run","name":"--run","title":"`--run`","scope":"module","overloadOf":null,"stability":null,"added":["v22.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.3.0"],"prUrl":"https://github.com/nodejs/node/pull/53032","commit":null,"description":"NODE_RUN_SCRIPT_NAME environment variable is added."},{"versions":["v22.3.0"],"prUrl":"https://github.com/nodejs/node/pull/53058","commit":null,"description":"NODE_RUN_PACKAGE_JSON_PATH environment variable is added."},{"versions":["v22.3.0"],"prUrl":"https://github.com/nodejs/node/pull/53154","commit":null,"description":"Traverses up to the root directory and finds a `package.json` file to run the command from, and updates `PATH` environment variable accordingly."}],"description":"This runs a specified command from a package.json's `\"scripts\"` object.\nIf a missing `\"command\"` is provided, it will list the available scripts.\n\n`--run` will traverse up to the root directory and finds a `package.json`\nfile to run the command from.\n\n`--run` prepends `./node_modules/.bin` for each ancestor of\nthe current directory, to the `PATH` in order to execute the binaries from\ndifferent folders where multiple `node_modules` directories are present, if\n`ancestor-folder/node_modules/.bin` is a directory.\n\n`--run` executes the command in the directory containing the related `package.json`.\n\nFor example, the following command will run the `test` script of\nthe `package.json` in the current folder:\n\n```console\n$ node --run test\n```\n\nYou can also pass arguments to the command. Any argument after `--` will\nbe appended to the script:\n\n```console\n$ node --run test -- --verbose\n```","summary":"This runs a specified command from a package.json's `\"scripts\"` object. If a missing `\"command\"` is provided, it will list the available scripts.","examples":[{"language":"console","displayName":null,"code":"$ node --run test"},{"language":"console","displayName":null,"code":"$ node --run test -- --verbose"}],"children":[{"kind":"section","id":"intentional-limitations","name":"Intentional limitations","title":"Intentional limitations","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"`node --run` is not meant to match the behaviors of `npm run` or of the `run`\ncommands of other package managers. The Node.js implementation is intentionally\nmore limited, in order to focus on top performance for the most common use\ncases.\nSome features of other `run` implementations that are intentionally excluded\nare:\n\n* Running `pre` or `post` scripts in addition to the specified script.\n* Defining package manager-specific environment variables.","summary":"`node --run` is not meant to match the behaviors of `npm run` or of the `run` commands of other package managers. The Node.js implementation is intentionally more limited, in order to focus on top performance for the most common use cases. Some features of other `run` implementations that are intentionally excluded are:","examples":[],"children":[]},{"kind":"section","id":"environment-variables","name":"Environment variables","title":"Environment variables","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The following environment variables are set when running a script with `--run`:\n\n* `NODE_RUN_SCRIPT_NAME`: The name of the script being run. For example, if\n  `--run` is used to run `test`, the value of this variable will be `test`.\n* `NODE_RUN_PACKAGE_JSON_PATH`: The path to the `package.json` that is being\n  processed.\n\nEnvironment variables loaded from a file with [`--env-file`](#--env-filefile) are not applied\nto the command executed by `--run`.","summary":"The following environment variables are set when running a script with `--run`:","examples":[],"children":[]}]},{"kind":"section","id":"--secure-heap-minn","name":"--secure-heap-min=n","title":"`--secure-heap-min=n`","scope":"module","overloadOf":null,"stability":null,"added":["v15.6.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When using `--secure-heap`, the `--secure-heap-min` flag specifies the\nminimum allocation from the secure heap. The minimum value is `2`.\nThe maximum value is the lesser of `--secure-heap` or `2147483647`.\nThe value given must be a power of two.","summary":"When using `--secure-heap`, the `--secure-heap-min` flag specifies the minimum allocation from the secure heap. The minimum value is `2`. The maximum value is the lesser of `--secure-heap` or `2147483647`. The value given must be a power of two.","examples":[],"children":[]},{"kind":"section","id":"--secure-heapn","name":"--secure-heap=n","title":"`--secure-heap=n`","scope":"module","overloadOf":null,"stability":null,"added":["v15.6.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Initializes an OpenSSL secure heap of `n` bytes. When initialized, the\nsecure heap is used for selected types of allocations within OpenSSL\nduring key generation and other operations. This is useful, for instance,\nto prevent sensitive information from leaking due to pointer overruns\nor underruns.\n\nThe secure heap is a fixed size and cannot be resized at runtime so,\nif used, it is important to select a large enough heap to cover all\napplication uses.\n\nThe heap size given must be a power of two. Any value less than 2\nwill disable the secure heap.\n\nThe secure heap is disabled by default.\n\nThe secure heap is not available on Windows.\n\nSee [`CRYPTO_secure_malloc_init`](https://www.openssl.org/docs/man3.0/man3/CRYPTO_secure_malloc_init.html) for more details.","summary":"Initializes an OpenSSL secure heap of `n` bytes. When initialized, the secure heap is used for selected types of allocations within OpenSSL during key generation and other operations. This is useful, for instance, to prevent sensitive information from leaking due to pointer overruns or underruns.","examples":[],"children":[]},{"kind":"section","id":"--snapshot-blobpath","name":"--snapshot-blob=path","title":"`--snapshot-blob=path`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v18.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When used with `--build-snapshot`, `--snapshot-blob` specifies the path\nwhere the generated snapshot blob is written to. If not specified, the\ngenerated blob is written to `snapshot.blob` in the current working directory.\n\nWhen used without `--build-snapshot`, `--snapshot-blob` specifies the\npath to the blob that is used to restore the application state.\n\nWhen loading a snapshot, Node.js checks that:\n\n1. The version, architecture, and platform of the running Node.js binary\n   are exactly the same as that of the binary that generates the snapshot.\n2. The V8 flags and CPU features are compatible with that of the binary\n   that generates the snapshot.\n\nIf they don't match, Node.js refuses to load the snapshot and exits with\nstatus code 1.","summary":"When used with `--build-snapshot`, `--snapshot-blob` specifies the path where the generated snapshot blob is written to. If not specified, the generated blob is written to `snapshot.blob` in the current working directory.","examples":[],"children":[]},{"kind":"section","id":"--test","name":"--test","title":"`--test`","scope":"module","overloadOf":null,"stability":null,"added":["v18.1.0","v16.17.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v20.0.0"],"prUrl":"https://github.com/nodejs/node/pull/46983","commit":null,"description":"The test runner is now stable."},{"versions":["v19.2.0","v18.13.0"],"prUrl":"https://github.com/nodejs/node/pull/45214","commit":null,"description":"Test runner now supports running in watch mode."}],"description":"Starts the Node.js command line test runner. This flag cannot be combined with\n`--watch-path`, `--check`, `--eval`, `--interactive`, or the inspector.\nSee the documentation on [running tests from the command line](test.html#running-tests-from-the-command-line)\nfor more details.","summary":"Starts the Node.js command line test runner. This flag cannot be combined with `--watch-path`, `--check`, `--eval`, `--interactive`, or the inspector. See the documentation on running tests from the command line for more details.","examples":[],"children":[]},{"kind":"section","id":"--test-concurrency","name":"--test-concurrency","title":"`--test-concurrency`","scope":"module","overloadOf":null,"stability":null,"added":["v21.0.0","v20.10.0","v18.19.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The maximum number of test files that the test runner CLI will execute\nconcurrently. If `--test-isolation` is set to `'none'`, this flag is ignored and\nconcurrency is one. Otherwise, concurrency defaults to\n`os.availableParallelism() - 1`.","summary":"The maximum number of test files that the test runner CLI will execute concurrently. If `--test-isolation` is set to `'none'`, this flag is ignored and concurrency is one. Otherwise, concurrency defaults to `os.availableParallelism() - 1`.","examples":[],"children":[]},{"kind":"section","id":"--test-coverage-branchesthreshold","name":"--test-coverage-branches=threshold","title":"`--test-coverage-branches=threshold`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v22.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Require a minimum percent of covered branches. If code coverage does not reach\nthe threshold specified, the process will exit with code `1`.","summary":"Require a minimum percent of covered branches. If code coverage does not reach the threshold specified, the process will exit with code `1`.","examples":[],"children":[]},{"kind":"section","id":"--test-coverage-exclude","name":"--test-coverage-exclude","title":"`--test-coverage-exclude`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v22.5.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Excludes specific files from code coverage using a glob pattern, which can match\nboth absolute and relative file paths.\n\nThis option may be specified multiple times to exclude multiple glob patterns.\n\nIf both `--test-coverage-exclude` and `--test-coverage-include` are provided,\nfiles must meet **both** criteria to be included in the coverage report.\n\nBy default all the matching test files are excluded from the coverage report.\nSpecifying this option will override the default behavior.","summary":"Excludes specific files from code coverage using a glob pattern, which can match both absolute and relative file paths.","examples":[],"children":[]},{"kind":"section","id":"--test-coverage-functionsthreshold","name":"--test-coverage-functions=threshold","title":"`--test-coverage-functions=threshold`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v22.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Require a minimum percent of covered functions. If code coverage does not reach\nthe threshold specified, the process will exit with code `1`.","summary":"Require a minimum percent of covered functions. If code coverage does not reach the threshold specified, the process will exit with code `1`.","examples":[],"children":[]},{"kind":"section","id":"--test-coverage-include","name":"--test-coverage-include","title":"`--test-coverage-include`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v22.5.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Includes specific files in code coverage using a glob pattern, which can match\nboth absolute and relative file paths.\n\nThis option may be specified multiple times to include multiple glob patterns.\n\nIf both `--test-coverage-exclude` and `--test-coverage-include` are provided,\nfiles must meet **both** criteria to be included in the coverage report.","summary":"Includes specific files in code coverage using a glob pattern, which can match both absolute and relative file paths.","examples":[],"children":[]},{"kind":"section","id":"--test-coverage-include-all","name":"--test-coverage-include-all","title":"`--test-coverage-include-all`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v26.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Includes source files that were never loaded by the test run in the coverage\nreport, where they are reported as having zero coverage.\n\nCandidate files are searched for in the current working directory, and are\nsubject to the same `--test-coverage-include` and `--test-coverage-exclude`\nfiltering as the rest of the report.","summary":"Includes source files that were never loaded by the test run in the coverage report, where they are reported as having zero coverage.","examples":[],"children":[]},{"kind":"section","id":"--test-coverage-linesthreshold","name":"--test-coverage-lines=threshold","title":"`--test-coverage-lines=threshold`","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":["v22.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Require a minimum percent of covered lines. If code coverage does not reach\nthe threshold specified, the process will exit with code `1`.","summary":"Require a minimum percent of covered lines. If code coverage does not reach the threshold specified, the process will exit with code `1`.","examples":[],"children":[]},{"kind":"section","id":"--test-force-exit","name":"--test-force-exit","title":"`--test-force-exit`","scope":"module","overloadOf":null,"stability":null,"added":["v22.0.0","v20.14.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Configures the test runner to exit the process once all known tests have\nfinished executing even if the event loop would otherwise remain active.","summary":"Configures the test runner to exit the process once all known tests have finished executing even if the event loop would otherwise remain active.","examples":[],"children":[]},{"kind":"section","id":"--test-global-setupmodule","name":"--test-global-setup=module","title":"`--test-global-setup=module`","scope":"module","overloadOf":null,"stability":{"index":"1.0","description":"Early development"},"added":["v24.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Specify a module that will be evaluated before all tests are executed and\ncan be used to setup global state or fixtures for tests.\n\nSee the documentation on [global setup and teardown](test.html#global-setup-and-teardown) for more details.","summary":"Specify a module that will be evaluated before all tests are executed and can be used to setup global state or fixtures for tests.","examples":[],"children":[]},{"kind":"section","id":"--test-isolationmode","name":"--test-isolation=mode","title":"`--test-isolation=mode`","scope":"module","overloadOf":null,"stability":null,"added":["v22.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v23.6.0"],"prUrl":"https://github.com/nodejs/node/pull/56298","commit":null,"description":"This flag was renamed from `--experimental-test-isolation` to `--test-isolation`."}],"description":"Configures the type of test isolation used in the test runner. When `mode` is\n`'process'`, each test file is run in a separate child process. When `mode` is\n`'none'`, all test files run in the same process as the test runner. The default\nisolation mode is `'process'`. This flag is ignored if the `--test` flag is not\npresent. See the [test runner execution model](test.html#test-runner-execution-model) section for more information.","summary":"Configures the type of test isolation used in the test runner. When `mode` is `'process'`, each test file is run in a separate child process. When `mode` is `'none'`, all test files run in the same process as the test runner. The default isolation mode is `'process'`. This flag is ignored if the `--test` flag is not present. See the test runner execution model section for more information.","examples":[],"children":[]},{"kind":"section","id":"--test-name-pattern","name":"--test-name-pattern","title":"`--test-name-pattern`","scope":"module","overloadOf":null,"stability":null,"added":["v18.11.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v20.0.0"],"prUrl":"https://github.com/nodejs/node/pull/46983","commit":null,"description":"The test runner is now stable."}],"description":"A regular expression that configures the test runner to only execute tests\nwhose name matches the provided pattern. See the documentation on\n[filtering tests by name](test.html#filtering-tests-by-name) for more details.\n\nIf both `--test-name-pattern` and `--test-skip-pattern` are supplied,\ntests must satisfy **both** requirements in order to be executed.","summary":"A regular expression that configures the test runner to only execute tests whose name matches the provided pattern. See the documentation on filtering tests by name for more details.","examples":[],"children":[]},{"kind":"section","id":"--test-only","name":"--test-only","title":"`--test-only`","scope":"module","overloadOf":null,"stability":null,"added":["v18.0.0","v16.17.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v20.0.0"],"prUrl":"https://github.com/nodejs/node/pull/46983","commit":null,"description":"The test runner is now stable."}],"description":"Configures the test runner to only execute top level tests that have the `only`\noption set. This flag is not necessary when test isolation is disabled.","summary":"Configures the test runner to only execute top level tests that have the `only` option set. This flag is not necessary when test isolation is disabled.","examples":[],"children":[]},{"kind":"section","id":"--test-random-seed","name":"--test-random-seed","title":"`--test-random-seed`","scope":"module","overloadOf":null,"stability":null,"added":["v26.1.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Set the seed used to randomize test execution order. This applies to both test\nfile execution order and queued tests within each file. Providing this flag\nenables randomization implicitly, even without `--test-randomize`.\n\nThe value must be an integer between `0` and `4294967295`.\n\nThis flag cannot be used with `--watch` or `--test-rerun-failures`.","summary":"Set the seed used to randomize test execution order. This applies to both test file execution order and queued tests within each file. Providing this flag enables randomization implicitly, even without `--test-randomize`.","examples":[],"children":[]},{"kind":"section","id":"--test-randomize","name":"--test-randomize","title":"`--test-randomize`","scope":"module","overloadOf":null,"stability":null,"added":["v26.1.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Randomize test execution order. This applies to both test file execution order\nand queued tests within each file. This can help detect tests that rely on\nshared state or execution order.\n\nThe seed used for randomization is printed in the test summary and can be\nreused with `--test-random-seed`.\n\nFor detailed behavior and examples, see\n[randomizing tests execution order](test.html#randomizing-tests-execution-order).\n\nThis flag cannot be used with `--watch` or `--test-rerun-failures`.","summary":"Randomize test execution order. This applies to both test file execution order and queued tests within each file. This can help detect tests that rely on shared state or execution order.","examples":[],"children":[]},{"kind":"section","id":"--test-reporter","name":"--test-reporter","title":"`--test-reporter`","scope":"module","overloadOf":null,"stability":null,"added":["v19.6.0","v18.15.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v20.0.0"],"prUrl":"https://github.com/nodejs/node/pull/46983","commit":null,"description":"The test runner is now stable."}],"description":"A test reporter to use when running tests. See the documentation on\n[test reporters](test.html#test-reporters) for more details.","summary":"A test reporter to use when running tests. See the documentation on test reporters for more details.","examples":[],"children":[]},{"kind":"section","id":"--test-reporter-destination","name":"--test-reporter-destination","title":"`--test-reporter-destination`","scope":"module","overloadOf":null,"stability":null,"added":["v19.6.0","v18.15.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v20.0.0"],"prUrl":"https://github.com/nodejs/node/pull/46983","commit":null,"description":"The test runner is now stable."}],"description":"The destination for the corresponding test reporter. See the documentation on\n[test reporters](test.html#test-reporters) for more details.","summary":"The destination for the corresponding test reporter. See the documentation on test reporters for more details.","examples":[],"children":[]},{"kind":"section","id":"--test-rerun-failures","name":"--test-rerun-failures","title":"`--test-rerun-failures`","scope":"module","overloadOf":null,"stability":null,"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"A path to a file allowing the test runner to persist the state of the test\nsuite between runs. The test runner will use this file to determine which tests\nhave already succeeded or failed, allowing for re-running of failed tests\nwithout having to re-run the entire test suite. The test runner will create this\nfile if it does not exist.\nSee the documentation on [test reruns](test.html#rerunning-failed-tests) for more details.","summary":"A path to a file allowing the test runner to persist the state of the test suite between runs. The test runner will use this file to determine which tests have already succeeded or failed, allowing for re-running of failed tests without having to re-run the entire test suite. The test runner will create this file if it does not exist. See the documentation on test reruns for more details.","examples":[],"children":[]},{"kind":"section","id":"--test-shard","name":"--test-shard","title":"`--test-shard`","scope":"module","overloadOf":null,"stability":null,"added":["v20.5.0","v18.19.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Test suite shard to execute in a format of `<index>/<total>`, where\n\n* `index` is a positive integer, index of divided parts.\n* `total` is a positive integer, total of divided part.\n\nThis command will divide all tests files into `total` equal parts,\nand will run only those that happen to be in an `index` part.\n\nFor example, to split your tests suite into three parts, use this:\n\n```bash\nnode --test --test-shard=1/3\nnode --test --test-shard=2/3\nnode --test --test-shard=3/3\n```","summary":"Test suite shard to execute in a format of `<index>/<total>`, where","examples":[{"language":"bash","displayName":null,"code":"node --test --test-shard=1/3\nnode --test --test-shard=2/3\nnode --test --test-shard=3/3"}],"children":[]},{"kind":"section","id":"--test-skip-pattern","name":"--test-skip-pattern","title":"`--test-skip-pattern`","scope":"module","overloadOf":null,"stability":null,"added":["v22.1.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"A regular expression that configures the test runner to skip tests\nwhose name matches the provided pattern. See the documentation on\n[filtering tests by name](test.html#filtering-tests-by-name) for more details.\n\nIf both `--test-name-pattern` and `--test-skip-pattern` are supplied,\ntests must satisfy **both** requirements in order to be executed.","summary":"A regular expression that configures the test runner to skip tests whose name matches the provided pattern. See the documentation on filtering tests by name for more details.","examples":[],"children":[]},{"kind":"section","id":"--test-timeout","name":"--test-timeout","title":"`--test-timeout`","scope":"module","overloadOf":null,"stability":null,"added":["v21.2.0","v20.11.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"A number of milliseconds the test execution will fail after. If unspecified,\nsubtests inherit this value from their parent. The default value is `Infinity`.","summary":"A number of milliseconds the test execution will fail after. If unspecified, subtests inherit this value from their parent. The default value is `Infinity`.","examples":[],"children":[]},{"kind":"section","id":"--test-update-snapshots","name":"--test-update-snapshots","title":"`--test-update-snapshots`","scope":"module","overloadOf":null,"stability":null,"added":["v22.3.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v23.4.0","v22.13.0"],"prUrl":"https://github.com/nodejs/node/pull/55897","commit":null,"description":"Snapshot testing is no longer experimental."}],"description":"Regenerates the snapshot files used by the test runner for [snapshot testing](test.html#snapshot-testing).","summary":"Regenerates the snapshot files used by the test runner for snapshot testing.","examples":[],"children":[]},{"kind":"section","id":"--throw-deprecation","name":"--throw-deprecation","title":"`--throw-deprecation`","scope":"module","overloadOf":null,"stability":null,"added":["v0.11.14"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Throw errors for deprecations.","summary":"Throw errors for deprecations.","examples":[],"children":[]},{"kind":"section","id":"--titletitle","name":"--title=title","title":"`--title=title`","scope":"module","overloadOf":null,"stability":null,"added":["v10.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Set `process.title` on startup.","summary":"Set `process.title` on startup.","examples":[],"children":[]},{"kind":"section","id":"--tls-cipher-listlist","name":"--tls-cipher-list=list","title":"`--tls-cipher-list=list`","scope":"module","overloadOf":null,"stability":null,"added":["v4.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Specify an alternative default TLS cipher list. Requires Node.js to be built\nwith crypto support (default).","summary":"Specify an alternative default TLS cipher list. Requires Node.js to be built with crypto support (default).","examples":[],"children":[]},{"kind":"section","id":"--tls-keylogfile","name":"--tls-keylog=file","title":"`--tls-keylog=file`","scope":"module","overloadOf":null,"stability":null,"added":["v13.2.0","v12.16.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Log TLS key material to a file. The key material is in NSS `SSLKEYLOGFILE`\nformat and can be used by software (such as Wireshark) to decrypt the TLS\ntraffic.","summary":"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.","examples":[],"children":[]},{"kind":"section","id":"--tls-max-v12","name":"--tls-max-v1.2","title":"`--tls-max-v1.2`","scope":"module","overloadOf":null,"stability":null,"added":["v12.0.0","v10.20.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Set [`tls.DEFAULT_MAX_VERSION`](tls.html#tlsdefault_max_version) to 'TLSv1.2'. Use to disable support for\nTLSv1.3.","summary":"Set `tls.DEFAULT_MAX_VERSION` to 'TLSv1.2'. Use to disable support for TLSv1.3.","examples":[],"children":[]},{"kind":"section","id":"--tls-max-v13","name":"--tls-max-v1.3","title":"`--tls-max-v1.3`","scope":"module","overloadOf":null,"stability":null,"added":["v12.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Set default [`tls.DEFAULT_MAX_VERSION`](tls.html#tlsdefault_max_version) to 'TLSv1.3'. Use to enable support\nfor TLSv1.3.","summary":"Set default `tls.DEFAULT_MAX_VERSION` to 'TLSv1.3'. Use to enable support for TLSv1.3.","examples":[],"children":[]},{"kind":"section","id":"--tls-min-v10","name":"--tls-min-v1.0","title":"`--tls-min-v1.0`","scope":"module","overloadOf":null,"stability":null,"added":["v12.0.0","v10.20.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Set default [`tls.DEFAULT_MIN_VERSION`](tls.html#tlsdefault_min_version) to 'TLSv1'. Use for compatibility with\nold TLS clients or servers.","summary":"Set default `tls.DEFAULT_MIN_VERSION` to 'TLSv1'. Use for compatibility with old TLS clients or servers.","examples":[],"children":[]},{"kind":"section","id":"--tls-min-v11","name":"--tls-min-v1.1","title":"`--tls-min-v1.1`","scope":"module","overloadOf":null,"stability":null,"added":["v12.0.0","v10.20.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Set default [`tls.DEFAULT_MIN_VERSION`](tls.html#tlsdefault_min_version) to 'TLSv1.1'. Use for compatibility\nwith old TLS clients or servers.","summary":"Set default `tls.DEFAULT_MIN_VERSION` to 'TLSv1.1'. Use for compatibility with old TLS clients or servers.","examples":[],"children":[]},{"kind":"section","id":"--tls-min-v12","name":"--tls-min-v1.2","title":"`--tls-min-v1.2`","scope":"module","overloadOf":null,"stability":null,"added":["v12.2.0","v10.20.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Set default [`tls.DEFAULT_MIN_VERSION`](tls.html#tlsdefault_min_version) to 'TLSv1.2'. This is the default for\n12.x and later, but the option is supported for compatibility with older Node.js\nversions.","summary":"Set default `tls.DEFAULT_MIN_VERSION` to 'TLSv1.2'. This is the default for 12.x and later, but the option is supported for compatibility with older Node.js versions.","examples":[],"children":[]},{"kind":"section","id":"--tls-min-v13","name":"--tls-min-v1.3","title":"`--tls-min-v1.3`","scope":"module","overloadOf":null,"stability":null,"added":["v12.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Set default [`tls.DEFAULT_MIN_VERSION`](tls.html#tlsdefault_min_version) to 'TLSv1.3'. Use to disable support\nfor TLSv1.2, which is not as secure as TLSv1.3.","summary":"Set default `tls.DEFAULT_MIN_VERSION` to 'TLSv1.3'. Use to disable support for TLSv1.2, which is not as secure as TLSv1.3.","examples":[],"children":[]},{"kind":"section","id":"--trace-deprecation","name":"--trace-deprecation","title":"`--trace-deprecation`","scope":"module","overloadOf":null,"stability":null,"added":["v0.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Print stack traces for deprecations.","summary":"Print stack traces for deprecations.","examples":[],"children":[]},{"kind":"section","id":"--trace-env","name":"--trace-env","title":"`--trace-env`","scope":"module","overloadOf":null,"stability":null,"added":["v23.4.0","v22.13.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Print information about any access to environment variables done in the current Node.js\ninstance to stderr, including:\n\n* The environment variable reads that Node.js does internally.\n* Writes in the form of `process.env.KEY = \"SOME VALUE\"`.\n* Reads in the form of `process.env.KEY`.\n* Definitions in the form of `Object.defineProperty(process.env, 'KEY', {...})`.\n* Queries in the form of `Object.hasOwn(process.env, 'KEY')`,\n  `process.env.hasOwnProperty('KEY')` or `'KEY' in process.env`.\n* Deletions in the form of `delete process.env.KEY`.\n* Enumerations inf the form of `...process.env` or `Object.keys(process.env)`.\n\nOnly the names of the environment variables being accessed are printed. The values are not printed.\n\nTo print the stack trace of the access, use `--trace-env-js-stack` and/or\n`--trace-env-native-stack`.","summary":"Print information about any access to environment variables done in the current Node.js instance to stderr, including:","examples":[],"children":[]},{"kind":"section","id":"--trace-env-js-stack","name":"--trace-env-js-stack","title":"`--trace-env-js-stack`","scope":"module","overloadOf":null,"stability":null,"added":["v23.4.0","v22.13.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"In addition to what `--trace-env` does, this prints the JavaScript stack trace of the access.","summary":"In addition to what `--trace-env` does, this prints the JavaScript stack trace of the access.","examples":[],"children":[]},{"kind":"section","id":"--trace-env-native-stack","name":"--trace-env-native-stack","title":"`--trace-env-native-stack`","scope":"module","overloadOf":null,"stability":null,"added":["v23.4.0","v22.13.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"In addition to what `--trace-env` does, this prints the native stack trace of the access.","summary":"In addition to what `--trace-env` does, this prints the native stack trace of the access.","examples":[],"children":[]},{"kind":"section","id":"--trace-event-categories","name":"--trace-event-categories","title":"`--trace-event-categories`","scope":"module","overloadOf":null,"stability":null,"added":["v7.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"A comma separated list of categories that should be traced when trace event\ntracing is enabled using `--trace-events-enabled`.","summary":"A comma separated list of categories that should be traced when trace event tracing is enabled using `--trace-events-enabled`.","examples":[],"children":[]},{"kind":"section","id":"--trace-event-file-pattern","name":"--trace-event-file-pattern","title":"`--trace-event-file-pattern`","scope":"module","overloadOf":null,"stability":null,"added":["v9.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Template string specifying the filepath for the trace event data, it\nsupports `${rotation}` and `${pid}`.","summary":"Template string specifying the filepath for the trace event data, it supports `${rotation}` and `${pid}`.","examples":[],"children":[]},{"kind":"section","id":"--trace-events-enabled","name":"--trace-events-enabled","title":"`--trace-events-enabled`","scope":"module","overloadOf":null,"stability":null,"added":["v7.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Enables the collection of trace event tracing information.","summary":"Enables the collection of trace event tracing information.","examples":[],"children":[]},{"kind":"section","id":"--trace-exit","name":"--trace-exit","title":"`--trace-exit`","scope":"module","overloadOf":null,"stability":null,"added":["v13.5.0","v12.16.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Prints a stack trace whenever an environment is exited proactively,\ni.e. invoking `process.exit()`.","summary":"Prints a stack trace whenever an environment is exited proactively, i.e. invoking `process.exit()`.","examples":[],"children":[]},{"kind":"section","id":"--trace-require-modulemode","name":"--trace-require-module=mode","title":"`--trace-require-module=mode`","scope":"module","overloadOf":null,"stability":null,"added":["v23.5.0","v22.13.0","v20.19.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Prints information about usage of [Loading ECMAScript modules using `require()`](modules.html#loading-ecmascript-modules-using-require).\n\nWhen `mode` is `all`, all usage is printed. When `mode` is `no-node-modules`, usage\nfrom the `node_modules` folder is excluded.","summary":"Prints information about usage of Loading ECMAScript modules using `require()`.","examples":[],"children":[]},{"kind":"section","id":"--trace-sigint","name":"--trace-sigint","title":"`--trace-sigint`","scope":"module","overloadOf":null,"stability":null,"added":["v13.9.0","v12.17.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Prints a stack trace on SIGINT.","summary":"Prints a stack trace on SIGINT.","examples":[],"children":[]},{"kind":"section","id":"--trace-sync-io","name":"--trace-sync-io","title":"`--trace-sync-io`","scope":"module","overloadOf":null,"stability":null,"added":["v2.1.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Prints a stack trace whenever synchronous I/O is detected after the first turn\nof the event loop.","summary":"Prints a stack trace whenever synchronous I/O is detected after the first turn of the event loop.","examples":[],"children":[]},{"kind":"section","id":"--trace-tls","name":"--trace-tls","title":"`--trace-tls`","scope":"module","overloadOf":null,"stability":null,"added":["v12.2.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Prints TLS packet trace information to `stderr`. This can be used to debug TLS\nconnection problems.","summary":"Prints TLS packet trace information to `stderr`. This can be used to debug TLS connection problems.","examples":[],"children":[]},{"kind":"section","id":"--trace-uncaught","name":"--trace-uncaught","title":"`--trace-uncaught`","scope":"module","overloadOf":null,"stability":null,"added":["v13.1.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Print stack traces for uncaught exceptions; usually, the stack trace associated\nwith the creation of an `Error` is printed, whereas this makes Node.js also\nprint the stack trace associated with throwing the value (which does not need\nto be an `Error` instance).\n\nEnabling this option may affect garbage collection behavior negatively.","summary":"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` instance).","examples":[],"children":[]},{"kind":"section","id":"--trace-warnings","name":"--trace-warnings","title":"`--trace-warnings`","scope":"module","overloadOf":null,"stability":null,"added":["v6.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Print stack traces for process warnings (including deprecations).","summary":"Print stack traces for process warnings (including deprecations).","examples":[],"children":[]},{"kind":"section","id":"--track-heap-objects","name":"--track-heap-objects","title":"`--track-heap-objects`","scope":"module","overloadOf":null,"stability":null,"added":["v2.4.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Track heap object allocations for heap snapshots.","summary":"Track heap object allocations for heap snapshots.","examples":[],"children":[]},{"kind":"section","id":"--unhandled-rejectionsmode","name":"--unhandled-rejections=mode","title":"`--unhandled-rejections=mode`","scope":"module","overloadOf":null,"stability":null,"added":["v12.0.0","v10.17.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v15.0.0"],"prUrl":"https://github.com/nodejs/node/pull/33021","commit":null,"description":"Changed default mode to `throw`. Previously, a warning was emitted."}],"description":"Using this flag allows to change what should happen when an unhandled rejection\noccurs. One of the following modes can be chosen:\n\n* `throw`: Emit [`unhandledRejection`](process.html#event-unhandledrejection). If this hook is not set, raise the\n  unhandled rejection as an uncaught exception. This is the default.\n* `strict`: Raise the unhandled rejection as an uncaught exception. If the\n  exception is handled, [`unhandledRejection`](process.html#event-unhandledrejection) is emitted.\n* `warn`: Always trigger a warning, no matter if the [`unhandledRejection`](process.html#event-unhandledrejection)\n  hook is set or not but do not print the deprecation warning.\n* `warn-with-error-code`: Emit [`unhandledRejection`](process.html#event-unhandledrejection). If this hook is not\n  set, trigger a warning, and set the process exit code to 1.\n* `none`: Silence all warnings.\n\nIf a rejection happens during the command line entry point's ES module static\nloading phase, it will always raise it as an uncaught exception.","summary":"Using this flag allows to change what should happen when an unhandled rejection occurs. One of the following modes can be chosen:","examples":[],"children":[]},{"kind":"section","id":"--use-bundled-ca---use-openssl-ca","name":"--use-bundled-ca, --use-openssl-ca","title":"`--use-bundled-ca`, `--use-openssl-ca`","scope":"module","overloadOf":null,"stability":null,"added":["v6.11.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Use bundled Mozilla CA store as supplied by current Node.js version\nor use OpenSSL's default CA store. The default store is selectable\nat build-time.\n\nThe bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store\nthat is fixed at release time. It is identical on all supported platforms.\n\nUsing OpenSSL store allows for external modifications of the store. For most\nLinux and BSD distributions, this store is maintained by the distribution\nmaintainers and system administrators. OpenSSL CA store location is dependent on\nconfiguration of the OpenSSL library but this can be altered at runtime using\nenvironment variables.\n\nSee `SSL_CERT_DIR` and `SSL_CERT_FILE`.","summary":"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.","examples":[],"children":[]},{"kind":"section","id":"--use-env-proxy","name":"--use-env-proxy","title":"`--use-env-proxy`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active Development"},"added":["v24.5.0","v22.21.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When enabled, Node.js parses the `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY`\nenvironment variables during startup, and routes requests through the\nspecified proxy.\n\nUse this only with proxies that are trusted and authorized for the deployment.\nProxy support is intended for reaching external networks through authorized\nproxy servers, for example when a firewall requires one. It is not for hiding\ntraffic or evading network policy. See [Built-in Proxy Support](http.html#built-in-proxy-support).\n\nThis is equivalent to setting the [`NODE_USE_ENV_PROXY=1`](#node_use_env_proxy1) environment variable.\nWhen both are set, `--use-env-proxy` takes precedence.","summary":"When enabled, Node.js parses the `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables during startup, and routes requests through the specified proxy.","examples":[],"children":[]},{"kind":"section","id":"--use-largepagesmode","name":"--use-largepages=mode","title":"`--use-largepages=mode`","scope":"module","overloadOf":null,"stability":null,"added":["v13.6.0","v12.17.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Re-map the Node.js static code to large memory pages at startup. If supported on\nthe target system, this will cause the Node.js static code to be moved onto 2\nMiB pages instead of 4 KiB pages.\n\nThe following values are valid for `mode`:\n\n* `off`: No mapping will be attempted. This is the default.\n* `on`: If supported by the OS, mapping will be attempted. Failure to map will\n  be ignored and a message will be printed to standard error.\n* `silent`: If supported by the OS, mapping will be attempted. Failure to map\n  will be ignored and will not be reported.","summary":"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.","examples":[],"children":[]},{"kind":"section","id":"--use-system-ca","name":"--use-system-ca","title":"`--use-system-ca`","scope":"module","overloadOf":null,"stability":null,"added":["v23.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v23.9.0"],"prUrl":"https://github.com/nodejs/node/pull/57009","commit":null,"description":"Added support on non-Windows and non-macOS."}],"description":"Node.js uses the trusted CA certificates present in the system store along with\nthe `--use-bundled-ca` option and the `NODE_EXTRA_CA_CERTS` environment variable.\nOn platforms other than Windows and macOS, this loads certificates from the directory\nand file trusted by OpenSSL, similar to `--use-openssl-ca`, with the difference being\nthat it caches the certificates after first load.\n\nOn Windows and macOS, the certificate trust policy is similar to\n[Chromium's policy for locally trusted certificates](https://chromium.googlesource.com/chromium/src/+/main/net/data/ssl/chrome_root_store/faq.md#does-the-chrome-certificate-verifier-consider-local-trust-decisions), but with some differences:\n\nOn macOS, the following settings are respected:\n\n* Default and System Keychains\n  * Trust:\n    * Any certificate where the “When using this certificate” flag is set to “Always Trust” or\n    * Any certificate where the “Secure Sockets Layer (SSL)” flag is set to “Always Trust”.\n  * The certificate must also be valid, with \"X.509 Basic Policy\" set to  “Always Trust”.\n\nOn Windows, the following settings are respected:\n\n* Local Machine (accessed via `certlm.msc`)\n  * Trust:\n    * Trusted Root Certification Authorities\n    * Trusted People\n    * Enterprise Trust -> Enterprise -> Trusted Root Certification Authorities\n    * Enterprise Trust -> Enterprise -> Trusted People\n    * Enterprise Trust -> Group Policy -> Trusted Root Certification Authorities\n    * Enterprise Trust -> Group Policy -> Trusted People\n* Current User (accessed via `certmgr.msc`)\n  * Trust:\n    * Trusted Root Certification Authorities\n    * Enterprise Trust -> Group Policy -> Trusted Root Certification Authorities\n\nOn Windows and macOS, Node.js would check that the user settings for the trusted\ncertificates do not forbid them for TLS server authentication before using them.\n\nNode.js currently does not support distrust/revocation of certificates\nfrom another source based on system settings.\n\nOn other systems, Node.js loads certificates from the default certificate file\n(typically `/etc/ssl/cert.pem`) and default certificate directory (typically\n`/etc/ssl/certs`) that the version of OpenSSL that Node.js links to respects.\nThis typically works with the convention on major Linux distributions and other\nUnix-like systems. If the overriding OpenSSL environment variables\n(typically `SSL_CERT_FILE` and `SSL_CERT_DIR`, depending on the configuration\nof the OpenSSL that Node.js links to) are set, the specified paths will be used to load\ncertificates instead. These environment variables can be used as workarounds\nif the conventional paths used by the version of OpenSSL Node.js links to are\nnot consistent with the system configuration that the users have for some reason.","summary":"Node.js uses the trusted CA certificates present in the system store along with the `--use-bundled-ca` option and the `NODE_EXTRA_CA_CERTS` environment variable. On platforms other than Windows and macOS, this loads certificates from the directory and file trusted by OpenSSL, similar to `--use-openssl-ca`, with the difference being that it caches the certificates after first load.","examples":[],"children":[]},{"kind":"section","id":"--v8-options","name":"--v8-options","title":"`--v8-options`","scope":"module","overloadOf":null,"stability":null,"added":["v0.1.3"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Print V8 command-line options.","summary":"Print V8 command-line options.","examples":[],"children":[]},{"kind":"section","id":"--v8-pool-sizenum","name":"--v8-pool-size=num","title":"`--v8-pool-size=num`","scope":"module","overloadOf":null,"stability":null,"added":["v5.10.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Set V8's thread pool size which will be used to allocate background jobs.\n\nIf set to `0` then Node.js will choose an appropriate size of the thread pool\nbased on an estimate of the amount of parallelism.\n\nThe amount of parallelism refers to the number of computations that can be\ncarried out simultaneously in a given machine. In general, it's the same as the\namount of CPUs, but it may diverge in environments such as VMs or containers.","summary":"Set V8's thread pool size which will be used to allocate background jobs.","examples":[],"children":[]},{"kind":"section","id":"-version","name":"-v, --version","title":"`-v`, `--version`","scope":"module","overloadOf":null,"stability":null,"added":["v0.1.3"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Print node's version.","summary":"Print node's version.","examples":[],"children":[]},{"kind":"section","id":"--watch","name":"--watch","title":"`--watch`","scope":"module","overloadOf":null,"stability":null,"added":["v18.11.0","v16.19.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.0.0","v20.13.0"],"prUrl":"https://github.com/nodejs/node/pull/52074","commit":null,"description":"Watch mode is now stable."},{"versions":["v19.2.0","v18.13.0"],"prUrl":"https://github.com/nodejs/node/pull/45214","commit":null,"description":"Test runner now supports running in watch mode."}],"description":"Starts Node.js in watch mode.\nWhen in watch mode, changes in the watched files cause the Node.js process to\nrestart.\nBy default, watch mode will watch the entry point\nand any required or imported module.\nUse `--watch-path` to specify what paths to watch.\n\nThis flag cannot be combined with\n`--check`, `--eval`, `--interactive`, or the REPL.\n\nNote: The `--watch` flag requires a file path as an argument and is incompatible\nwith `--run` or inline script input, as `--run` takes precedence and ignores watch\nmode. If no file is provided, Node.js will exit with status code `9`.\n\n```bash\nnode --watch index.js\n```","summary":"Starts Node.js in watch mode. When in watch mode, changes in the watched files cause the Node.js process to restart. By default, watch mode will watch the entry point and any required or imported module. Use `--watch-path` to specify what paths to watch.","examples":[{"language":"bash","displayName":null,"code":"node --watch index.js"}],"children":[]},{"kind":"section","id":"--watch-kill-signal","name":"--watch-kill-signal","title":"`--watch-kill-signal`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active Development"},"added":["v24.4.0","v22.18.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Customizes the signal sent to the process on watch mode restarts.\n\n```bash\nnode --watch --watch-kill-signal SIGINT test.js\n```","summary":"Customizes the signal sent to the process on watch mode restarts.","examples":[{"language":"bash","displayName":null,"code":"node --watch --watch-kill-signal SIGINT test.js"}],"children":[]},{"kind":"section","id":"--watch-path","name":"--watch-path","title":"`--watch-path`","scope":"module","overloadOf":null,"stability":null,"added":["v18.11.0","v16.19.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.0.0","v20.13.0"],"prUrl":"https://github.com/nodejs/node/pull/52074","commit":null,"description":"Watch mode is now stable."}],"description":"Starts Node.js in watch mode and specifies what paths to watch.\nWhen in watch mode, changes in the watched paths cause the Node.js process to\nrestart.\nThis will turn off watching of required or imported modules, even when used in\ncombination with `--watch`.\n\nThis flag cannot be combined with\n`--check`, `--eval`, `--interactive`, `--test`, or the REPL.\n\nNote: Using `--watch-path` implicitly enables `--watch`, which requires a file path\nand is incompatible with `--run`, as `--run` takes precedence and ignores watch mode.\n\n```bash\nnode --watch-path=./src --watch-path=./tests index.js\n```\n\nThis option is only supported on macOS and Windows.\nAn `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` exception will be thrown\nwhen the option is used on a platform that does not support it.","summary":"Starts Node.js in watch mode and specifies what paths to watch. When in watch mode, changes in the watched paths cause the Node.js process to restart. This will turn off watching of required or imported modules, even when used in combination with `--watch`.","examples":[{"language":"bash","displayName":null,"code":"node --watch-path=./src --watch-path=./tests index.js"}],"children":[]},{"kind":"section","id":"--watch-preserve-output","name":"--watch-preserve-output","title":"`--watch-preserve-output`","scope":"module","overloadOf":null,"stability":null,"added":["v19.3.0","v18.13.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Disable the clearing of the console when watch mode restarts the process.\n\n```bash\nnode --watch --watch-preserve-output test.js\n```","summary":"Disable the clearing of the console when watch mode restarts the process.","examples":[{"language":"bash","displayName":null,"code":"node --watch --watch-preserve-output test.js"}],"children":[]},{"kind":"section","id":"--zero-fill-buffers","name":"--zero-fill-buffers","title":"`--zero-fill-buffers`","scope":"module","overloadOf":null,"stability":null,"added":["v6.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Automatically zero-fills all newly allocated [`Buffer`](buffer.html#class-buffer) instances.","summary":"Automatically zero-fills all newly allocated `Buffer` instances.","examples":[],"children":[]}]},{"kind":"section","id":"environment-variables-1","name":"Environment variables","title":"Environment variables","scope":"module","overloadOf":null,"stability":{"index":"2","description":"Stable"},"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[{"kind":"section","id":"force_color1-2-3","name":"FORCE_COLOR=[1, 2, 3]","title":"`FORCE_COLOR=[1, 2, 3]`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The `FORCE_COLOR` environment variable is used to\nenable ANSI colorized output. The value may be:\n\n* `1`, `true`, or the empty string `''` indicate 16-color support,\n* `2` to indicate 256-color support, or\n* `3` to indicate 16 million-color support.\n\nWhen `FORCE_COLOR` is used and set to a supported value, both the `NO_COLOR`,\nand `NODE_DISABLE_COLORS` environment variables are ignored.\n\nAny other value will result in colorized output being disabled.","summary":"The `FORCE_COLOR` environment variable is used to enable ANSI colorized output. The value may be:","examples":[],"children":[]},{"kind":"section","id":"node_compile_cachedir","name":"NODE_COMPILE_CACHE=dir","title":"`NODE_COMPILE_CACHE=dir`","scope":"module","overloadOf":null,"stability":null,"added":["v22.1.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v25.4.0"],"prUrl":"https://github.com/nodejs/node/pull/60971","commit":null,"description":"This feature is no longer experimental."}],"description":"Enable the [module compile cache](module.html#module-compile-cache) for the Node.js instance. See the documentation of\n[module compile cache](module.html#module-compile-cache) for details.","summary":"Enable the module compile cache for the Node.js instance. See the documentation of module compile cache for details.","examples":[],"children":[]},{"kind":"section","id":"node_compile_cache_portable1","name":"NODE_COMPILE_CACHE_PORTABLE=1","title":"`NODE_COMPILE_CACHE_PORTABLE=1`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When set to 1, the [module compile cache](module.html#module-compile-cache) can be reused across different directory\nlocations as long as the module layout relative to the cache directory remains the same,\nand by any user (the cache subdirectory is not suffixed with the creating user's uid).","summary":"When set to 1, the module compile cache can be reused across different directory locations as long as the module layout relative to the cache directory remains the same, and by any user (the cache subdirectory is not suffixed with the creating user's uid).","examples":[],"children":[]},{"kind":"section","id":"node_compile_cache_readonly1","name":"NODE_COMPILE_CACHE_READONLY=1","title":"`NODE_COMPILE_CACHE_READONLY=1`","scope":"module","overloadOf":null,"stability":null,"added":["v26.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When set to 1, the [module compile cache](module.html#module-compile-cache) only reads existing entries from\nits directory: nothing is written to it and it is not created if missing.","summary":"When set to 1, the module compile cache only reads existing entries from its directory: nothing is written to it and it is not created if missing.","examples":[],"children":[]},{"kind":"section","id":"node_debugmodule","name":"NODE_DEBUG=module[,…]","title":"`NODE_DEBUG=module[,…]`","scope":"module","overloadOf":null,"stability":null,"added":["v0.1.32"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"`','`-separated list of core modules that should print debug information.","summary":"`','`-separated list of core modules that should print debug information.","examples":[],"children":[]},{"kind":"section","id":"node_debug_nativemodule","name":"NODE_DEBUG_NATIVE=module[,…]","title":"`NODE_DEBUG_NATIVE=module[,…]`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"`','`-separated list of core C++ modules that should print debug information.","summary":"`','`-separated list of core C++ modules that should print debug information.","examples":[],"children":[]},{"kind":"section","id":"node_disable_colors1","name":"NODE_DISABLE_COLORS=1","title":"`NODE_DISABLE_COLORS=1`","scope":"module","overloadOf":null,"stability":null,"added":["v0.3.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When set, colors will not be used in the REPL.","summary":"When set, colors will not be used in the REPL.","examples":[],"children":[]},{"kind":"section","id":"node_disable_compile_cache1","name":"NODE_DISABLE_COMPILE_CACHE=1","title":"`NODE_DISABLE_COMPILE_CACHE=1`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active Development"},"added":["v22.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Disable the [module compile cache](module.html#module-compile-cache) for the Node.js instance. See the documentation of\n[module compile cache](module.html#module-compile-cache) for details.","summary":"Disable the module compile cache for the Node.js instance. See the documentation of module compile cache for details.","examples":[],"children":[]},{"kind":"section","id":"node_extra_ca_certsfile","name":"NODE_EXTRA_CA_CERTS=file","title":"`NODE_EXTRA_CA_CERTS=file`","scope":"module","overloadOf":null,"stability":null,"added":["v7.3.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When set, the well known \"root\" CAs (like VeriSign) will be extended with the\nextra certificates in `file`. The file should consist of one or more trusted\ncertificates in PEM format. A message will be emitted (once) with\n[`process.emitWarning()`](process.html#processemitwarningwarning-options) if the file is missing or\nmalformed, but any errors are otherwise ignored.\n\nNeither the well known nor extra certificates are used when the `ca`\noptions property is explicitly specified for a TLS or HTTPS client or server.\n\nThis environment variable is ignored when `node` runs as setuid root or\nhas Linux file capabilities set.\n\nThe `NODE_EXTRA_CA_CERTS` environment variable is only read when the Node.js\nprocess is first launched. Changing the value at runtime using\n`process.env.NODE_EXTRA_CA_CERTS` has no effect on the current process.","summary":"When set, the well known \"root\" CAs (like VeriSign) will be extended with the extra certificates in `file`. The file should consist of one or more trusted certificates in PEM format. A message will be emitted (once) with `process.emitWarning()` if the file is missing or malformed, but any errors are otherwise ignored.","examples":[],"children":[]},{"kind":"section","id":"node_icu_datafile","name":"NODE_ICU_DATA=file","title":"`NODE_ICU_DATA=file`","scope":"module","overloadOf":null,"stability":null,"added":["v0.11.15"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Data path for ICU (`Intl` object) data. Will extend linked-in data when compiled\nwith small-icu support.","summary":"Data path for ICU (`Intl` object) data. Will extend linked-in data when compiled with small-icu support.","examples":[],"children":[]},{"kind":"section","id":"node_no_warnings1","name":"NODE_NO_WARNINGS=1","title":"`NODE_NO_WARNINGS=1`","scope":"module","overloadOf":null,"stability":null,"added":["v6.11.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When set to `1`, process warnings are silenced.","summary":"When set to `1`, process warnings are silenced.","examples":[],"children":[]},{"kind":"section","id":"node_optionsoptions","name":"NODE_OPTIONS=options...","title":"`NODE_OPTIONS=options...`","scope":"module","overloadOf":null,"stability":null,"added":["v8.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"A space-separated list of command-line options. `options...` are interpreted\nbefore command-line options, so command-line options will override or\ncompound after anything in `options...`. Node.js will exit with an error if\nan option that is not allowed in the environment is used, such as `-p` or a\nscript file.\n\nIf an option value contains a space, it can be escaped using double quotes:\n\n```bash\nNODE_OPTIONS='--require \"./my path/file.js\"'\n```\n\nA singleton flag passed as a command-line option will override the same flag\npassed into `NODE_OPTIONS`:\n\n```bash\n# The inspector will be available on port 5555\nNODE_OPTIONS='--inspect=localhost:4444' node --inspect=localhost:5555\n```\n\nA flag that can be passed multiple times will be treated as if its\n`NODE_OPTIONS` instances were passed first, and then its command-line\ninstances afterwards:\n\n```bash\nNODE_OPTIONS='--require \"./a.js\"' node --require \"./b.js\"\n# is equivalent to:\nnode --require \"./a.js\" --require \"./b.js\"\n```\n\nNode.js options that are allowed are in the following list. If an option\nsupports both --XX and --no-XX variants, they are both supported but only\none is included in the list below.\n\n* `--allow-addons`\n* `--allow-child-process`\n* `--allow-ffi`\n* `--allow-fs-read`\n* `--allow-fs-write`\n* `--allow-inspector`\n* `--allow-net`\n* `--allow-openssl-store`\n* `--allow-wasi`\n* `--allow-worker`\n* `--conditions`, `-C`\n* `--cpu-prof-dir`\n* `--cpu-prof-interval`\n* `--cpu-prof-name`\n* `--cpu-prof`\n* `--diagnostic-dir`\n* `--disable-proto`\n* `--disable-sigusr1`\n* `--disable-warning`\n* `--disable-wasm-trap-handler`\n* `--dns-result-order`\n* `--enable-fips`\n* `--enable-network-family-autoselection`\n* `--enable-source-maps`\n* `--entry-url`\n* `--experimental-abortcontroller`\n* `--experimental-addon-modules`\n* `--experimental-detect-module`\n* `--experimental-eventsource`\n* `--experimental-ffi`\n* `--experimental-import-meta-resolve`\n* `--experimental-import-text`\n* `--experimental-json-modules`\n* `--experimental-loader`\n* `--experimental-modules`\n* `--experimental-package-map`\n* `--experimental-print-required-tla`\n* `--experimental-quic`\n* `--experimental-require-module`\n* `--experimental-shadow-realm`\n* `--experimental-specifier-resolution`\n* `--experimental-stream-iter`\n* `--experimental-test-isolation`\n* `--experimental-top-level-await`\n* `--experimental-vfs`\n* `--experimental-vm-modules`\n* `--experimental-wasi-unstable-preview1`\n* `--force-context-aware`\n* `--force-fips`\n* `--force-node-api-uncaught-exceptions-policy`\n* `--frozen-intrinsics`\n* `--heap-prof-dir`\n* `--heap-prof-interval`\n* `--heap-prof-name`\n* `--heap-prof`\n* `--heapsnapshot-near-heap-limit`\n* `--heapsnapshot-signal`\n* `--http-parser`\n* `--icu-data-dir`\n* `--import`\n* `--input-type`\n* `--insecure-http-parser`\n* `--inspect-brk`\n* `--inspect-port`, `--debug-port`\n* `--inspect-publish-uid`\n* `--inspect-wait`\n* `--inspect`\n* `--localstorage-file`\n* `--max-http-header-size`\n* `--max-old-space-size-percentage`\n* `--network-family-autoselection-attempt-timeout`\n* `--no-addons`\n* `--no-async-context-frame`\n* `--no-deprecation`\n* `--no-experimental-global-navigator`\n* `--no-experimental-repl-await`\n* `--no-experimental-sqlite`\n* `--no-experimental-strip-types`\n* `--no-experimental-websocket`\n* `--no-experimental-webstorage`\n* `--no-extra-info-on-fatal-exception`\n* `--no-force-async-hooks-checks`\n* `--no-global-search-paths`\n* `--no-network-family-autoselection`\n* `--no-strip-types`\n* `--no-warnings`\n* `--no-webstorage`\n* `--node-memory-debug`\n* `--openssl-config`\n* `--openssl-legacy-provider`\n* `--openssl-shared-config`\n* `--pending-deprecation`\n* `--permission-audit`\n* `--permission`\n* `--preserve-symlinks-main`\n* `--preserve-symlinks`\n* `--prof-process`\n* `--redirect-warnings`\n* `--report-compact`\n* `--report-dir`, `--report-directory`\n* `--report-exclude-env`\n* `--report-exclude-network`\n* `--report-filename`\n* `--report-on-fatalerror`\n* `--report-on-signal`\n* `--report-signal`\n* `--report-uncaught-exception`\n* `--require-module`\n* `--require`, `-r`\n* `--secure-heap-min`\n* `--secure-heap`\n* `--snapshot-blob`\n* `--test-coverage-branches`\n* `--test-coverage-exclude`\n* `--test-coverage-functions`\n* `--test-coverage-include-all`\n* `--test-coverage-include`\n* `--test-coverage-lines`\n* `--test-global-setup`\n* `--test-isolation`\n* `--test-name-pattern`\n* `--test-only`\n* `--test-random-seed`\n* `--test-randomize`\n* `--test-reporter-destination`\n* `--test-reporter`\n* `--test-rerun-failures`\n* `--test-shard`\n* `--test-skip-pattern`\n* `--throw-deprecation`\n* `--title`\n* `--tls-cipher-list`\n* `--tls-keylog`\n* `--tls-max-v1.2`\n* `--tls-max-v1.3`\n* `--tls-min-v1.0`\n* `--tls-min-v1.1`\n* `--tls-min-v1.2`\n* `--tls-min-v1.3`\n* `--trace-deprecation`\n* `--trace-env-js-stack`\n* `--trace-env-native-stack`\n* `--trace-env`\n* `--trace-event-categories`\n* `--trace-event-file-pattern`\n* `--trace-events-enabled`\n* `--trace-exit`\n* `--trace-require-module`\n* `--trace-sigint`\n* `--trace-sync-io`\n* `--trace-tls`\n* `--trace-uncaught`\n* `--trace-warnings`\n* `--track-heap-objects`\n* `--unhandled-rejections`\n* `--use-bundled-ca`\n* `--use-env-proxy`\n* `--use-largepages`\n* `--use-openssl-ca`\n* `--use-system-ca`\n* `--v8-pool-size`\n* `--watch-kill-signal`\n* `--watch-path`\n* `--watch-preserve-output`\n* `--watch`\n* `--zero-fill-buffers`\n\nV8 options that are allowed are:\n\n* `--abort-on-uncaught-exception`\n* `--disallow-code-generation-from-strings`\n* `--enable-etw-stack-walking`\n* `--expose-gc`\n* `--interpreted-frames-native-stack`\n* `--jitless`\n* `--max-heap-size`\n* `--max-old-space-size`\n* `--max-semi-space-size`\n* `--perf-basic-prof-only-functions`\n* `--perf-basic-prof`\n* `--perf-prof-unwinding-info`\n* `--perf-prof`\n* `--stack-trace-limit`\n\n`--perf-basic-prof-only-functions`, `--perf-basic-prof`,\n`--perf-prof-unwinding-info`, and `--perf-prof` are only available on Linux.\n\n`--enable-etw-stack-walking` is only available on Windows.","summary":"A space-separated list of command-line options. `options...` are interpreted before command-line options, so command-line options will override or compound after anything in `options...`. Node.js will exit with an error if an option that is not allowed in the environment is used, such as `-p` or a script file.","examples":[{"language":"bash","displayName":null,"code":"NODE_OPTIONS='--require \"./my path/file.js\"'"},{"language":"bash","displayName":null,"code":"# The inspector will be available on port 5555\nNODE_OPTIONS='--inspect=localhost:4444' node --inspect=localhost:5555"},{"language":"bash","displayName":null,"code":"NODE_OPTIONS='--require \"./a.js\"' node --require \"./b.js\"\n# is equivalent to:\nnode --require \"./a.js\" --require \"./b.js\""}],"children":[]},{"kind":"section","id":"node_pathpath","name":"NODE_PATH=path[:…]","title":"`NODE_PATH=path[:…]`","scope":"module","overloadOf":null,"stability":null,"added":["v0.1.32"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"`':'`-separated list of directories prefixed to the module search path.\n\nOn Windows, this is a `';'`-separated list instead.","summary":"`':'`-separated list of directories prefixed to the module search path.","examples":[],"children":[]},{"kind":"section","id":"node_pending_deprecation1","name":"NODE_PENDING_DEPRECATION=1","title":"`NODE_PENDING_DEPRECATION=1`","scope":"module","overloadOf":null,"stability":null,"added":["v8.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When set to `1`, emit pending deprecation warnings.\n\nPending deprecations are generally identical to a runtime deprecation with the\nnotable exception that they are turned *off* by default and will not be emitted\nunless either the `--pending-deprecation` command-line flag, or the\n`NODE_PENDING_DEPRECATION=1` environment variable, is set. Pending deprecations\nare used to provide a kind of selective \"early warning\" mechanism that\ndevelopers may leverage to detect deprecated API usage.","summary":"When set to `1`, emit pending deprecation warnings.","examples":[],"children":[]},{"kind":"section","id":"node_pending_pipe_instancesinstances","name":"NODE_PENDING_PIPE_INSTANCES=instances","title":"`NODE_PENDING_PIPE_INSTANCES=instances`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Set the number of pending pipe instance handles when the pipe server is waiting\nfor connections. This setting applies to Windows only.","summary":"Set the number of pending pipe instance handles when the pipe server is waiting for connections. This setting applies to Windows only.","examples":[],"children":[]},{"kind":"section","id":"node_preserve_symlinks1","name":"NODE_PRESERVE_SYMLINKS=1","title":"`NODE_PRESERVE_SYMLINKS=1`","scope":"module","overloadOf":null,"stability":null,"added":["v7.1.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When set to `1`, instructs the module loader to preserve symbolic links when\nresolving and caching modules.","summary":"When set to `1`, instructs the module loader to preserve symbolic links when resolving and caching modules.","examples":[],"children":[]},{"kind":"section","id":"node_redirect_warningsfile","name":"NODE_REDIRECT_WARNINGS=file","title":"`NODE_REDIRECT_WARNINGS=file`","scope":"module","overloadOf":null,"stability":null,"added":["v8.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When set, process warnings will be emitted to the given file instead of\nprinting to stderr. The file will be created if it does not exist, and will be\nappended to if it does. If an error occurs while attempting to write the\nwarning to the file, the warning will be written to stderr instead. This is\nequivalent to using the `--redirect-warnings=file` command-line flag.","summary":"When set, process warnings will be emitted to the given file instead of printing to stderr. The file will be created if it does not exist, and will be appended to if it does. If an error occurs while attempting to write the warning to the file, the warning will be written to stderr instead. This is equivalent to using the `--redirect-warnings=file` command-line flag.","examples":[],"children":[]},{"kind":"section","id":"node_repl_external_modulefile","name":"NODE_REPL_EXTERNAL_MODULE=file","title":"`NODE_REPL_EXTERNAL_MODULE=file`","scope":"module","overloadOf":null,"stability":null,"added":["v13.0.0","v12.16.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.3.0","v20.16.0"],"prUrl":"https://github.com/nodejs/node/pull/52905","commit":null,"description":"Remove the possibility to use this env var with kDisableNodeOptionsEnv for embedders."}],"description":"Path to a Node.js module which will be loaded in place of the built-in REPL.\nOverriding this value to an empty string (`''`) will use the built-in REPL.","summary":"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.","examples":[],"children":[]},{"kind":"section","id":"node_repl_historyfile","name":"NODE_REPL_HISTORY=file","title":"`NODE_REPL_HISTORY=file`","scope":"module","overloadOf":null,"stability":null,"added":["v3.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Path to the file used to store the persistent REPL history. The default path is\n`~/.node_repl_history`, which is overridden by this variable. Setting the value\nto an empty string (`''` or `' '`) disables persistent REPL history.","summary":"Path to the file used to store the persistent REPL history. The default path is `~/.node_repl_history`, which is overridden by this variable. Setting the value to an empty string (`''` or `' '`) disables persistent REPL history.","examples":[],"children":[]},{"kind":"section","id":"node_skip_platform_checkvalue","name":"NODE_SKIP_PLATFORM_CHECK=value","title":"`NODE_SKIP_PLATFORM_CHECK=value`","scope":"module","overloadOf":null,"stability":null,"added":["v14.5.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"If `value` equals `'1'`, the check for a supported platform is skipped during\nNode.js startup. Node.js might not execute correctly. Any issues encountered\non unsupported platforms will not be fixed.","summary":"If `value` equals `'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.","examples":[],"children":[]},{"kind":"section","id":"node_test_contextvalue","name":"NODE_TEST_CONTEXT=value","title":"`NODE_TEST_CONTEXT=value`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"If `value` equals `'child'`, test reporter options will be overridden and test\noutput will be sent to stdout in the TAP format. If any other value is provided,\nNode.js makes no guarantees about the reporter format used or its stability.","summary":"If `value` equals `'child'`, test reporter options will be overridden and test output will be sent to stdout in the TAP format. If any other value is provided, Node.js makes no guarantees about the reporter format used or its stability.","examples":[],"children":[]},{"kind":"section","id":"node_tls_reject_unauthorizedvalue","name":"NODE_TLS_REJECT_UNAUTHORIZED=value","title":"`NODE_TLS_REJECT_UNAUTHORIZED=value`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"If `value` equals `'0'`, certificate validation is disabled for TLS connections.\nThis makes TLS, and HTTPS by extension, insecure. The use of this environment\nvariable is strongly discouraged.","summary":"If `value` equals `'0'`, certificate validation is disabled for TLS connections. This makes TLS, and HTTPS by extension, insecure. The use of this environment variable is strongly discouraged.","examples":[],"children":[]},{"kind":"section","id":"node_use_env_proxy1","name":"NODE_USE_ENV_PROXY=1","title":"`NODE_USE_ENV_PROXY=1`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active Development"},"added":["v24.0.0","v22.21.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When enabled, Node.js parses the `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY`\nenvironment variables during startup, and routes requests through the\nspecified proxy.\n\nUse this only with proxies that are trusted and authorized for the deployment.\nProxy support is intended for reaching external networks through authorized\nproxy servers, for example when a firewall requires one. It is not for hiding\ntraffic or evading network policy. See [Built-in Proxy Support](http.html#built-in-proxy-support).\n\nThis can also be enabled using the [`--use-env-proxy`](#--use-env-proxy) command-line flag.\nWhen both are set, `--use-env-proxy` takes precedence.","summary":"When enabled, Node.js parses the `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables during startup, and routes requests through the specified proxy.","examples":[],"children":[]},{"kind":"section","id":"node_use_system_ca1","name":"NODE_USE_SYSTEM_CA=1","title":"`NODE_USE_SYSTEM_CA=1`","scope":"module","overloadOf":null,"stability":null,"added":["v24.6.0","v22.19.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Node.js uses the trusted CA certificates present in the system store along with\nthe `--use-bundled-ca` option and the `NODE_EXTRA_CA_CERTS` environment variable.\n\nThis can also be enabled using the [`--use-system-ca`](#--use-system-ca) command-line flag.\nWhen both are set, `--use-system-ca` takes precedence.","summary":"Node.js uses the trusted CA certificates present in the system store along with the `--use-bundled-ca` option and the `NODE_EXTRA_CA_CERTS` environment variable.","examples":[],"children":[]},{"kind":"section","id":"node_v8_coveragedir","name":"NODE_V8_COVERAGE=dir","title":"`NODE_V8_COVERAGE=dir`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"When set, Node.js will begin outputting [V8 JavaScript code coverage](https://v8project.blogspot.com/2017/12/javascript-code-coverage.html) and\n[Source Map](https://tc39.es/ecma426/) data to the directory provided as an argument (coverage\ninformation is written as JSON to files with a `coverage` prefix).\n\n`NODE_V8_COVERAGE` will automatically propagate to subprocesses, making it\neasier to instrument applications that call the `child_process.spawn()` family\nof functions. `NODE_V8_COVERAGE` can be set to an empty string, to prevent\npropagation.","summary":"When set, Node.js will begin outputting V8 JavaScript code coverage and Source Map data to the directory provided as an argument (coverage information is written as JSON to files with a `coverage` prefix).","examples":[],"children":[{"kind":"section","id":"coverage-output","name":"Coverage output","title":"Coverage output","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Coverage is output as an array of [ScriptCoverage](https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage) objects on the top-level\nkey `result`:\n\n```json\n{\n  \"result\": [\n    {\n      \"scriptId\": \"67\",\n      \"url\": \"internal/tty.js\",\n      \"functions\": []\n    }\n  ]\n}\n```","summary":"Coverage is output as an array of ScriptCoverage objects on the top-level key `result`:","examples":[{"language":"json","displayName":null,"code":"{\n  \"result\": [\n    {\n      \"scriptId\": \"67\",\n      \"url\": \"internal/tty.js\",\n      \"functions\": []\n    }\n  ]\n}"}],"children":[]},{"kind":"section","id":"source-map-cache","name":"Source map cache","title":"Source map cache","scope":"module","overloadOf":null,"stability":{"index":"1","description":"Experimental"},"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"If found, source map data is appended to the top-level key `source-map-cache`\non the JSON coverage object.\n\n`source-map-cache` is an object with keys representing the files source maps\nwere extracted from, and values which include the raw source-map URL\n(in the key `url`), the parsed Source Map v3 information (in the key `data`),\nand the line lengths of the source file (in the key `lineLengths`).\n\n```json\n{\n  \"result\": [\n    {\n      \"scriptId\": \"68\",\n      \"url\": \"file:///absolute/path/to/source.js\",\n      \"functions\": []\n    }\n  ],\n  \"source-map-cache\": {\n    \"file:///absolute/path/to/source.js\": {\n      \"url\": \"./path-to-map.json\",\n      \"data\": {\n        \"version\": 3,\n        \"sources\": [\n          \"file:///absolute/path/to/original.js\"\n        ],\n        \"names\": [\n          \"Foo\",\n          \"console\",\n          \"info\"\n        ],\n        \"mappings\": \"MAAMA,IACJC,YAAaC\",\n        \"sourceRoot\": \"./\"\n      },\n      \"lineLengths\": [\n        13,\n        62,\n        38,\n        27\n      ]\n    }\n  }\n}\n```","summary":"If found, source map data is appended to the top-level key `source-map-cache` on the JSON coverage object.","examples":[{"language":"json","displayName":null,"code":"{\n  \"result\": [\n    {\n      \"scriptId\": \"68\",\n      \"url\": \"file:///absolute/path/to/source.js\",\n      \"functions\": []\n    }\n  ],\n  \"source-map-cache\": {\n    \"file:///absolute/path/to/source.js\": {\n      \"url\": \"./path-to-map.json\",\n      \"data\": {\n        \"version\": 3,\n        \"sources\": [\n          \"file:///absolute/path/to/original.js\"\n        ],\n        \"names\": [\n          \"Foo\",\n          \"console\",\n          \"info\"\n        ],\n        \"mappings\": \"MAAMA,IACJC,YAAaC\",\n        \"sourceRoot\": \"./\"\n      },\n      \"lineLengths\": [\n        13,\n        62,\n        38,\n        27\n      ]\n    }\n  }\n}"}],"children":[]}]},{"kind":"section","id":"no_colorany","name":"NO_COLOR=<any>","title":"`NO_COLOR=<any>`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"[`NO_COLOR`](https://no-color.org)  is an alias for `NODE_DISABLE_COLORS`. The value of the\nenvironment variable is arbitrary.","summary":"`NO_COLOR`  is an alias for `NODE_DISABLE_COLORS`. The value of the environment variable is arbitrary.","examples":[],"children":[]},{"kind":"section","id":"openssl_conffile","name":"OPENSSL_CONF=file","title":"`OPENSSL_CONF=file`","scope":"module","overloadOf":null,"stability":null,"added":["v6.11.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Load an OpenSSL configuration file on startup. The file can be used as part of\na [FIPS mode](crypto.html#fips-mode) configuration.\n\nIf the variable is set to an empty value, Node.js starts without loading any\nOpenSSL configuration file. This is a way past a default configuration file\nthat exists but cannot be read, for example when `/etc/ssl` is not accessible\nto the user Node.js runs as, which is otherwise fatal at startup. No\nconfiguration is applied in that case, including any [FIPS mode](crypto.html#fips-mode) setup the\nfile would have performed.\n\nIf the [`--openssl-config`](#--openssl-configfile) command-line option is used, the environment\nvariable is ignored, and an empty value has no effect.","summary":"Load an OpenSSL configuration file on startup. The file can be used as part of a FIPS mode configuration.","examples":[],"children":[]},{"kind":"section","id":"ssl_cert_dirdir","name":"SSL_CERT_DIR=dir","title":"`SSL_CERT_DIR=dir`","scope":"module","overloadOf":null,"stability":null,"added":["v7.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"If `--use-openssl-ca` is enabled, or if `--use-system-ca` is enabled on\nplatforms other than macOS and Windows, this overrides and sets OpenSSL's directory\ncontaining trusted certificates.\n\nBe aware that unless the child environment is explicitly set, this environment\nvariable will be inherited by any child processes, and if they use OpenSSL, it\nmay cause them to trust the same CAs as node.","summary":"If `--use-openssl-ca` is enabled, or if `--use-system-ca` is enabled on platforms other than macOS and Windows, this overrides and sets OpenSSL's directory containing trusted certificates.","examples":[],"children":[]},{"kind":"section","id":"ssl_cert_filefile","name":"SSL_CERT_FILE=file","title":"`SSL_CERT_FILE=file`","scope":"module","overloadOf":null,"stability":null,"added":["v7.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"If `--use-openssl-ca` is enabled, or if `--use-system-ca` is enabled on\nplatforms other than macOS and Windows, this overrides and sets OpenSSL's file\ncontaining trusted certificates.\n\nBe aware that unless the child environment is explicitly set, this environment\nvariable will be inherited by any child processes, and if they use OpenSSL, it\nmay cause them to trust the same CAs as node.","summary":"If `--use-openssl-ca` is enabled, or if `--use-system-ca` is enabled on platforms other than macOS and Windows, this overrides and sets OpenSSL's file containing trusted certificates.","examples":[],"children":[]},{"kind":"section","id":"tz","name":"TZ","title":"`TZ`","scope":"module","overloadOf":null,"stability":null,"added":["v0.0.1"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v16.2.0"],"prUrl":"https://github.com/nodejs/node/pull/38642","commit":null,"description":"Changing the TZ variable using process.env.TZ = changes the timezone on Windows as well."},{"versions":["v13.0.0"],"prUrl":"https://github.com/nodejs/node/pull/20026","commit":null,"description":"Changing the TZ variable using process.env.TZ = changes the timezone on POSIX systems."}],"description":"The `TZ` environment variable is used to specify the timezone configuration.\n\nWhile Node.js does not support all of the various [ways that `TZ` is handled in\nother environments](https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html), it does support basic [timezone IDs](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) (such as\n`'Etc/UTC'`, `'Europe/Paris'`, or `'America/New_York'`).\nIt may support a few other abbreviations or aliases, but these are strongly\ndiscouraged and not guaranteed.\n\n```console\n$ TZ=Europe/Dublin node -pe \"new Date().toString()\"\nWed May 12 2021 20:30:48 GMT+0100 (Irish Standard Time)\n```","summary":"The `TZ` environment variable is used to specify the timezone configuration.","examples":[{"language":"console","displayName":null,"code":"$ TZ=Europe/Dublin node -pe \"new Date().toString()\"\nWed May 12 2021 20:30:48 GMT+0100 (Irish Standard Time)"}],"children":[]},{"kind":"section","id":"uv_threadpool_sizesize","name":"UV_THREADPOOL_SIZE=size","title":"`UV_THREADPOOL_SIZE=size`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Set the number of threads used in libuv's threadpool to `size` threads.\n\nAsynchronous system APIs are used by Node.js whenever possible, but where they\ndo not exist, libuv's threadpool is used to create asynchronous node APIs based\non synchronous system APIs. Node.js APIs that use the threadpool are:\n\n* all `fs` APIs, other than the file watcher APIs and those that are explicitly\n  synchronous\n* asynchronous crypto APIs such as `crypto.pbkdf2()`, `crypto.scrypt()`,\n  `crypto.randomBytes()`, `crypto.randomFill()`, `crypto.generateKeyPair()`\n* `dns.lookup()`\n* all `zlib` APIs, other than those that are explicitly synchronous\n\nBecause libuv's threadpool has a fixed size, it means that if for whatever\nreason any of these APIs takes a long time, other (seemingly unrelated) APIs\nthat run in libuv's threadpool will experience degraded performance. In order to\nmitigate this issue, one potential solution is to increase the size of libuv's\nthreadpool by setting the `'UV_THREADPOOL_SIZE'` environment variable to a value\ngreater than `4` (its current default value). However, setting this from inside\nthe process using `process.env.UV_THREADPOOL_SIZE=size` is not guaranteed to work\nas the threadpool would have been created as part of the runtime initialisation\nmuch before user code is run. For more information, see the [libuv threadpool documentation](https://docs.libuv.org/en/latest/threadpool.html).","summary":"Set the number of threads used in libuv's threadpool to `size` threads.","examples":[],"children":[]}]},{"kind":"section","id":"useful-v8-options","name":"Useful V8 options","title":"Useful V8 options","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"V8 has its own set of CLI options. Any V8 CLI option that is provided to `node`\nwill be passed on to V8 to handle. V8's options have *no stability guarantee*.\nThe V8 team themselves don't consider them to be part of their formal API,\nand reserve the right to change them at any time. Likewise, they are not\ncovered by the Node.js stability guarantees. Many of the V8\noptions are of interest only to V8 developers. Despite this, there is a small\nset of V8 options that are widely applicable to Node.js, and they are\ndocumented here:","summary":"V8 has its own set of CLI options. Any V8 CLI option that is provided to `node` will be passed on to V8 to handle. V8's options have _no stability guarantee_. The V8 team themselves don't consider them to be part of their formal API, and reserve the right to change them at any time. Likewise, they are not covered by the Node.js stability guarantees. Many of the V8 options are of interest only to V8 developers. Despite this, there is a small set of V8 options that are widely applicable to Node.js, and they are documented here:","examples":[],"children":[{"kind":"section","id":"--abort-on-uncaught-exception-1","name":"--abort-on-uncaught-exception","title":"`--abort-on-uncaught-exception`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[]},{"kind":"section","id":"--disallow-code-generation-from-strings-1","name":"--disallow-code-generation-from-strings","title":"`--disallow-code-generation-from-strings`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[]},{"kind":"section","id":"--enable-etw-stack-walking","name":"--enable-etw-stack-walking","title":"`--enable-etw-stack-walking`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[]},{"kind":"section","id":"--expose-gc","name":"--expose-gc","title":"`--expose-gc`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[]},{"kind":"section","id":"--harmony-shadow-realm","name":"--harmony-shadow-realm","title":"`--harmony-shadow-realm`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[]},{"kind":"section","id":"--heap-snapshot-on-oom","name":"--heap-snapshot-on-oom","title":"`--heap-snapshot-on-oom`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[]},{"kind":"section","id":"--interpreted-frames-native-stack","name":"--interpreted-frames-native-stack","title":"`--interpreted-frames-native-stack`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[]},{"kind":"section","id":"--jitless-1","name":"--jitless","title":"`--jitless`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[]},{"kind":"section","id":"--max-heap-size","name":"--max-heap-size","title":"`--max-heap-size`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Specifies the maximum heap size (in megabytes) for the process.\n\nThis option is typically used to limit the amount of memory the process can use for its JavaScript heap.\n\n<a id=\"--max-old-space-sizesize-in-megabytes\"></a>","summary":"Specifies the maximum heap size (in megabytes) for the process.","examples":[],"children":[]},{"kind":"section","id":"--max-old-space-sizesize-in-mib","name":"--max-old-space-size=SIZE (in MiB)","title":"`--max-old-space-size=SIZE` (in MiB)","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Sets the max memory size of V8's old memory section. As memory\nconsumption approaches the limit, V8 will spend more time on\ngarbage collection in an effort to free unused memory.\n\nOn a machine with 2 GiB of memory, consider setting this to\n1536 (1.5 GiB) to leave some memory for other uses and avoid swapping.\n\n```bash\nnode --max-old-space-size=1536 index.js\n```\n\n<a id=\"--max-semi-space-sizesize-in-megabytes\"></a>","summary":"Sets the max memory size of V8's old memory section. As memory consumption approaches the limit, V8 will spend more time on garbage collection in an effort to free unused memory.","examples":[{"language":"bash","displayName":null,"code":"node --max-old-space-size=1536 index.js"}],"children":[]},{"kind":"section","id":"--max-semi-space-sizesize-in-mib","name":"--max-semi-space-size=SIZE (in MiB)","title":"`--max-semi-space-size=SIZE` (in MiB)","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Sets the maximum [semi-space](https://v8.dev/blog/trash-talk#minor-gc) size for V8's [scavenge garbage collector](https://v8.dev/blog/orinoco-parallel-scavenger) in\nMiB (mebibytes).\nIncreasing the max size of a semi-space may improve throughput for Node.js at\nthe cost of more memory consumption.\n\nSince the young generation size of the V8 heap is three times (see\n[`YoungGenerationSizeFromSemiSpaceSize`](https://chromium.googlesource.com/v8/v8.git/+/refs/tags/10.3.129/src/heap/heap.cc#328) in V8) the size of the semi-space,\nan increase of 1 MiB to semi-space applies to each of the three individual\nsemi-spaces and causes the heap size to increase by 3 MiB. The throughput\nimprovement depends on your workload (see [#42511](https://github.com/nodejs/node/issues/42511)).\n\nThe default value depends on the memory limit. For example, on 64-bit systems\nwith a memory limit of 512 MiB, the max size of a semi-space defaults to 1 MiB.\nFor memory limits up to and including 2GiB, the default max size of a\nsemi-space will be less than 16 MiB on 64-bit systems.\n\nTo get the best configuration for your application, you should try different\nmax-semi-space-size values when running benchmarks for your application.\n\nFor example, benchmark on a 64-bit systems:\n\n```bash\nfor MiB in 16 32 64 128; do\n    node --max-semi-space-size=$MiB index.js\ndone\n```","summary":"Sets the maximum semi-space size for V8's scavenge garbage collector in MiB (mebibytes). Increasing the max size of a semi-space may improve throughput for Node.js at the cost of more memory consumption.","examples":[{"language":"bash","displayName":null,"code":"for MiB in 16 32 64 128; do\n    node --max-semi-space-size=$MiB index.js\ndone"}],"children":[]},{"kind":"section","id":"--perf-basic-prof","name":"--perf-basic-prof","title":"`--perf-basic-prof`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[]},{"kind":"section","id":"--perf-basic-prof-only-functions","name":"--perf-basic-prof-only-functions","title":"`--perf-basic-prof-only-functions`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[]},{"kind":"section","id":"--perf-prof","name":"--perf-prof","title":"`--perf-prof`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[]},{"kind":"section","id":"--perf-prof-unwinding-info","name":"--perf-prof-unwinding-info","title":"`--perf-prof-unwinding-info`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[]},{"kind":"section","id":"--prof-1","name":"--prof","title":"`--prof`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[]},{"kind":"section","id":"--security-revert","name":"--security-revert","title":"`--security-revert`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[]},{"kind":"section","id":"--stack-trace-limitlimit","name":"--stack-trace-limit=limit","title":"`--stack-trace-limit=limit`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The maximum number of stack frames to collect in an error's stack trace.\nSetting it to 0 disables stack trace collection. The default value is 10.\n\n```bash\nnode --stack-trace-limit=12 -p -e \"Error.stackTraceLimit\" # prints 12\n```","summary":"The maximum number of stack frames to collect in an error's stack trace. Setting it to 0 disables stack trace collection. The default value is 10.","examples":[{"language":"bash","displayName":null,"code":"node --stack-trace-limit=12 -p -e \"Error.stackTraceLimit\" # prints 12"}],"children":[]}]}]}