{"record":{"id":"4832634192b065ad","repo":"nodejs/node","slug":"internal-error-s-is-not-in-the-downloads-lis","errorCode":null,"errorMessage":"Internal error: \"%s\" is not in the --downloads list. Check nodedownload.py","messagePattern":"Internal error: \"(.+?)\" is not in the --downloads list\\. Check nodedownload\\.py","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"tools/configure.d/nodedownload.py","lineNumber":132,"sourceCode":"    if not anOpt or anOpt == \"\":\n      # ignore stray commas, etc.\n      continue\n    elif anOpt == 'all':\n      # all on\n      theRet = dict((key, True) for (key) in download_types)\n    else:\n      # turn this one on\n      if anOpt in download_types:\n        theRet[anOpt] = True\n      else:\n        # future proof: ignore unknown types\n        print('Warning: ignoring unknown --download= type \"%s\"' % anOpt)\n  # all done\n  return theRet\n\ndef candownload(auto_downloads, package):\n  if not (package in auto_downloads.keys()):\n    raise Exception('Internal error: \"%s\" is not in the --downloads list. Check nodedownload.py' % package)\n  if auto_downloads[package]:\n    return True\n  else:\n    print(\"\"\"Warning: Not downloading package \"%s\". You could pass \"--download=all\"\n    (Windows: \"download-all\") to try auto-downloading it.\"\"\" % package)\n    return False\n","sourceCodeStart":114,"sourceCodeEnd":139,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/tools/configure.d/nodedownload.py#L114-L139","documentation":"Raised by candownload() in Node's tools/configure.d/nodedownload.py when the requested package name is not a key in the auto_downloads dict. auto_downloads is built from the download_types set, so an unknown package name indicates a programming error — a caller asked about a package the download subsystem doesn't know about.","triggerScenarios":"Code calls candownload(auto_downloads, package) with a package string that was never added to the download_types set / auto_downloads dict. The message explicitly says 'Internal error ... Check nodedownload.py' because it's a developer/code bug, not a user config issue.","commonSituations":"Adding a new auto-downloadable package but forgetting to register it in download_types; a typo in the package name passed to candownload; refactoring that renames a package without updating callers.","solutions":["Add the missing package name to the download_types set near the top of nodedownload.py so it becomes a key in auto_downloads.","Fix the caller to pass the exact registered package name (check spelling/casing).","Re-run configure --download=<package> only after the name is registered."],"exampleFix":"# before\ndownload_types = set(['icu'])\ncandownload(auto_downloads, 'openssl')  # not registered -> internal error\n# after\ndownload_types = set(['icu', 'openssl'])\ncandownload(auto_downloads, 'openssl')","handlingStrategy":"validation","validationCode":"from tools.configure.d.nodedownload import download_types\ndef assert_package_registered(package: str):\n    if package not in download_types:\n        raise ValueError(f'{package!r} not registered in download_types; add it in nodedownload.py')","typeGuard":"def is_registered_download(package: str) -> bool:\n    from tools.configure.d.nodedownload import download_types\n    return package in download_types","tryCatchPattern":"null","preventionTips":["Register every new downloadable package in download_types when introduced.","Use the exact registered name in candownload callers.","Add a unit test asserting candownload accepts every download_type."],"tags":["node","configure","download","internal-error","registration"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}