Skip to main content
Process.execArgv - node__process.d.ts - Node documentation
property Process.execArgv

Usage in Deno

```typescript import { type Process } from "node:node__process.d.ts"; ```
The `process.execArgv` property returns the set of Node.js-specific command-line options passed when the Node.js process was launched. These options do not appear in the array returned by the argv property, and do not include the Node.js executable, the name of the script, or any options following the script name. These options are useful in order to spawn child processes with the same execution environment as the parent. ```bash node --icu-data-dir=./foo --require ./bar.js script.js --version ``` Results in `process.execArgv`: ```js ["--icu-data-dir=./foo", "--require", "./bar.js"] ``` And `process.argv`: ```js ['/usr/local/bin/node', 'script.js', '--version'] ``` Refer to `Worker constructor` for the detailed behavior of worker threads with this property.

Type

string[]