{"record":{"id":"8ec180780fa48b96","repo":"nodejs/node","slug":"u-file-access-error-8ec180","errorCode":"U_FILE_ACCESS_ERROR","errorMessage":"icupkg: unable to open list file \\\"%s\\\"\\n","messagePattern":"icupkg: unable to open list file \\\\\"(.+?)\\\\\"\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"deps/icu-small/source/tools/toolutil/pkg_icu.cpp","lineNumber":86,"sourceCode":"\n    if (listPkg == nullptr) {\n        listPkg=new Package();\n        if(listPkg==nullptr) {\n            fprintf(stderr, \"icupkg: not enough memory\\n\");\n            exit(U_MEMORY_ALLOCATION_ERROR);\n        }\n    }\n\n    listNameEnd=strchr(listname, 0);\n    if(isListTextFile(listname)) {\n        // read the list file\n        char line[1024];\n        char *end;\n        const char *start;\n\n        file=fopen(listname, \"r\");\n        if(file==nullptr) {\n            fprintf(stderr, \"icupkg: unable to open list file \\\"%s\\\"\\n\", listname);\n            delete listPkg;\n            exit(U_FILE_ACCESS_ERROR);\n        }\n\n        while(fgets(line, sizeof(line), file)) {\n            // remove comments\n            end=strchr(line, '#');\n            if(end!=nullptr) {\n                *end=0;\n            } else {\n                // remove trailing CR LF\n                end=strchr(line, 0);\n                while(line<end && (*(end-1)=='\\r' || *(end-1)=='\\n')) {\n                    *--end=0;\n                }\n            }\n\n            // check first non-whitespace character and","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/icu-small/source/tools/toolutil/pkg_icu.cpp#L68-L104","documentation":"readList fopen()s the list file (a .txt list) for reading and gets NULL back, so it deletes the Package, prints the list name, and exit(U_FILE_ACCESS_ERROR). This is the list-open failure for text-style lists (distinct from a .dat package path).","triggerScenarios":"Passing icupkg a list file ending in a text suffix that does not exist or is not readable. The guard `if(file==nullptr)` after `fopen(listname, \"r\")` fires before any line is parsed.","commonSituations":"Typo in the list path; running icupkg from the wrong cwd with a relative list; permissions on the list file; the list was generated into a different out dir than passed.","solutions":["Verify the list file is readable: `test -r \"$LIST\"` before calling icupkg.","Use an absolute path to the list file, or run icupkg from the right directory.","Regenerate the list file if it was never produced.","Fix ownership/permissions on the list file."],"exampleFix":"# before\nicupkg ./missing.txt out.dat   # 'unable to open list file'\n# after\ntest -r ./out/icudata.txt && icupkg ./out/icudata.txt out.dat || { echo regenerate list; exit 1; }","handlingStrategy":"validation","validationCode":"# verify the text list is readable before invoking icupkg\ntest -n \"$LIST\" && test -r \"$LIST\" || { echo \"list '$LIST' missing/unreadable\" >&2; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check the list path exists and is readable before packaging.","Use an absolute path or run icupkg from the correct directory.","Regenerate the list if it was never produced.","Fix ownership/permissions on list files."],"tags":["icu","icupkg","file-io","build-tools"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}