nodejs/node · error
%s: error in command line argument "%s"\n
Error message
%s: error in command line argument "%s"\n
What it means
derb (the resource-bundle disassembler, sibling of genrb) parses its options with u_parseArgs. A negative return means a bad token; derb prints pname (program name) and the offending argv[-argc]. The subsequent block may also print a full usage banner depending on flags.
Source
Thrown at deps/icu-small/source/tools/genrb/derb.cpp:106
/* Get the name of tool. */
pname = uprv_strrchr(*argv, U_FILE_SEP_CHAR);
#if U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR
if (!pname) {
pname = uprv_strrchr(*argv, U_FILE_ALT_SEP_CHAR);
}
#endif
if (!pname) {
pname = *argv;
} else {
++pname;
}
/* error handling, printing usage message */
argc=u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options);
/* error handling, printing usage message */
if(argc<0) {
fprintf(stderr,
"%s: error in command line argument \"%s\"\n", pname,
argv[-argc]);
}
if(argc<0 || options[0].doesOccur || options[1].doesOccur) {
fprintf(argc < 0 ? stderr : stdout,
"%csage: %s [ -h, -?, --help ] [ -V, --version ]\n"
" [ -v, --verbose ] [ -e, --encoding encoding ] [ --bom ]\n"
" [ -t, --truncate [ size ] ]\n"
" [ -s, --sourcedir source ] [ -d, --destdir destination ]\n"
" [ -i, --icudatadir directory ] [ -c, --to-stdout ]\n"
" [ -A, --suppressAliases]\n"
" bundle ...\n", argc < 0 ? 'u' : 'U',
pname);
return argc<0 ? U_ILLEGAL_ARGUMENT_ERROR : U_ZERO_ERROR;
}
if(options[10].doesOccur) {
fprintf(stderr,View on GitHub (pinned to 1b2de5e052)
Solutions
- Run `derb -h` to list supported options and remove the offending token shown in the message.
- Confirm each value-taking flag (-e, -t, -s, -d, -i) is followed by its argument.
- Check the derb invocation in your script against the documented option set.
Defensive patterns
Strategy: validation
Validate before calling
// derb supported flags
VALID_DERB = {'-h','-?','--help','-V','--version','-v','--verbose','-e','--encoding','--bom','-t','--truncate','-s','--sourcedir','-d','--destdir','-i','--icudatadir','-c','--to-stdout','-A','--suppressAliases'}
bad = [a for a in argv[1:] if a.startswith('-') and a.split('=')[0] not in VALID_DERB]
if bad: raise SystemExit(f'unknown derb option(s): {bad}') Prevention
- Always supply the argument to value-taking flags (-e,-t,-s,-d,-i).
- Don't reuse a genrb command line for derb; their option sets differ.
When it happens
Trigger: Passing an unknown option, an option requiring a value without one (e.g. -e with no encoding), or otherwise malformed arguments to derb. pname is derived from argv[0] (stripped to the basename).
Common situations: Running derb by hand with a typo'd flag; using a flag that belongs to genrb, not derb; a wrapper script that injects an extra option derb does not understand.
Related errors
- %s: Error: don't specify an encoding (-e) when writing to st
- %s: error in command line argument "%s"\n
- error in command line argument "%s"\n
- error in command line argument "%s"\n
- %s: cannot combine --writePoolBundle and --usePoolBundle\n
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/f269194a62c012d2.
Report an issue: GitHub.