nodejs/node · error

missing list file\n

Error message

missing list file\n

What it means

readList was called with listname NULL or an empty string, so it prints 'missing list file' and returns NULL (it does NOT exit). Callers must treat a NULL return as failure; writePackageDatFile maps it to U_ILLEGAL_ARGUMENT_ERROR.

Source

Thrown at deps/icu-small/source/tools/toolutil/pkg_icu.cpp:65

    }
    return false;
}

/*
 * Read a file list.
 * If the listname ends with ".txt", then read the list file
 * (in the system/ invariant charset).
 * If the listname ends with ".dat", then read the ICU .dat package file.
 * Otherwise, read the file itself as a single-item list.
 */
U_CAPI Package * U_EXPORT2
readList(const char *filesPath, const char *listname, UBool readContents, Package *listPkgIn) {
    Package *listPkg = listPkgIn;
    FILE *file;
    const char *listNameEnd;

    if(listname==nullptr || listname[0]==0) {
        fprintf(stderr, "missing list file\n");
        return nullptr;
    }

    if (listPkg == nullptr) {
        listPkg=new Package();
        if(listPkg==nullptr) {
            fprintf(stderr, "icupkg: not enough memory\n");
            exit(U_MEMORY_ALLOCATION_ERROR);
        }
    }

    listNameEnd=strchr(listname, 0);
    if(isListTextFile(listname)) {
        // read the list file
        char line[1024];
        char *end;
        const char *start;

View on GitHub (pinned to 1b2de5e052)

Solutions

  1. Always pass a non-empty list/package path to icupkg / readList.
  2. In shell, guard the arg: `${LIST:?list file required}` aborts if unset/empty.
  3. Check the return value for NULL and surface a clear error rather than continuing.
  4. Validate argv before invoking icupkg in build scripts.

Example fix

# before
icupkg "$MAYBE_EMPTY" out.dat   # MAYBE_EMPTY is empty -> 'missing list file'
# after
icupkg "${LIST:?list file required}" out.dat
Defensive patterns

Strategy: validation

Validate before calling

# never call icupkg/readList without a non-empty list/package path
[ -n "$LIST" ] || { echo "list file required" >&2; exit 1; }
icupkg "${LIST:?list file required}" "$OUT"

Prevention

When it happens

Trigger: Invoking icupkg (or calling readList) without supplying a list/package argument, or passing an empty string. The guard `if(listname==nullptr || listname[0]==0)` fires first.

Common situations: Wrong icupkg command line (missing positional arg); a wrapper script passing an unset env var that expands to empty; calling readList programmatically without validating the argument.

Related errors


AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13). Data as JSON: /api/errors/13327ce3ed0ee1d9. Report an issue: GitHub.