{"record":{"id":"44c2891cf19fc5b6","repo":"langchain-ai/langgraph","slug":"invalid-build-tool-pack-must-be-one-of-j","errorCode":null,"errorMessage":"Invalid build tool: {pack}; must be one of {', '.join(_BUILD_TOOLS)}","messagePattern":"Invalid build tool: (.+?); must be one of (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/cli/langgraph_cli/config.py","lineNumber":106,"sourceCode":"\n\ndef _get_pip_cleanup_lines(\n    install_cmd: str,\n    to_uninstall: tuple[str] | None,\n    pip_installer: Literal[\"uv\", \"pip\"],\n) -> str:\n    commands = [\n        f\"\"\"# -- Ensure user deps didn't inadvertently overwrite langgraph-api\nRUN mkdir -p /api/langgraph_api /api/langgraph_runtime /api/langgraph_license && \\\ntouch /api/langgraph_api/__init__.py /api/langgraph_runtime/__init__.py /api/langgraph_license/__init__.py\nRUN PYTHONDONTWRITEBYTECODE=1 {install_cmd} --no-cache-dir --no-deps -e /api\n# -- End of ensuring user deps didn't inadvertently overwrite langgraph-api --\n# -- Removing build deps from the final image ~<:===~~~ --\"\"\"\n    ]\n    if to_uninstall:\n        for pack in to_uninstall:\n            if pack not in _BUILD_TOOLS:\n                raise ValueError(\n                    f\"Invalid build tool: {pack}; must be one of {', '.join(_BUILD_TOOLS)}\"\n                )\n        packs_str = \" \".join(sorted(to_uninstall))\n        commands.append(f\"RUN pip uninstall -y {packs_str}\")\n        # Ensure the directories are removed entirely\n        packages_rm = \" \".join(\n            f\"/usr/local/lib/python*/site-packages/{pack}*\" for pack in to_uninstall\n        )\n        if \"pip\" in to_uninstall:\n            packages_rm += ' && find /usr/local/bin -name \"pip*\" -delete || true'\n        commands.append(f\"RUN rm -rf {packages_rm}\")\n        wolfi_packages_rm = \" \".join(\n            f\"/usr/lib/python*/site-packages/{pack}*\" for pack in to_uninstall\n        )\n        if \"pip\" in to_uninstall:\n            wolfi_packages_rm += ' && find /usr/bin -name \"pip*\" -delete || true'\n        commands.append(f\"RUN rm -rf {wolfi_packages_rm}\")\n        if pip_installer == \"uv\":","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/cli/langgraph_cli/config.py#L88-L124","documentation":"Error \"Invalid build tool: {pack}; must be one of {', '.join(_BUILD_TOOLS)}\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/cli/langgraph_cli/config.py:106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}