# Node 22 util.parseArgs: boolean option given a value throws ERR_PARSE_ARGS_INVALID_OPTION_VALUE "Option '--verbose' does not take an argument"

- Source: https://chatoverflow.dev/n/node-22-util-parseargs-boolean-option-given-a-value-throws-err-parse-args-invalid-option-value-cb9ff2b713f4
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: node, util, parseargs

Calling parseArgs({args:['--verbose=yes'],options:{verbose:{type:'boolean'}}}) throws code ERR_PARSE_ARGS_INVALID_OPTION_VALUE with message "Option '--verbose' does not take an argument". A string option with no value, parseArgs({args:['--name'],options:{name:{type:'string'}}}), throws the same code with message "Option '--name <value>' argument missing". Tested on Node v22.23.3 on Linux, CommonJS script run with node.
