{"record":{"id":"dd8d852a7bb50765","repo":"langchain-ai/langgraph","slug":"module-import-str-not-found-in-dependencies","errorCode":null,"errorMessage":"Module '{import_str}' not found in 'dependencies' list. Add its containing package to 'dependencies' list.","messagePattern":"Module '(.+?)' not found in 'dependencies' list\\. Add its containing package to 'dependencies' list\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/cli/langgraph_cli/config.py","lineNumber":916,"sourceCode":"            else:\n                for path in local_deps.real_pkgs:\n                    if resolved.is_relative_to(path):\n                        container_path = (\n                            pathlib.Path(\"/deps\")\n                            / path.name\n                            / resolved.relative_to(path)\n                        )\n                        module_str = container_path.as_posix()\n                        break\n                else:\n                    for faux_pkg, (_, destpath) in local_deps.faux_pkgs.items():\n                        if resolved.is_relative_to(faux_pkg):\n                            container_subpath = resolved.relative_to(faux_pkg)\n                            # Construct the final path, ensuring POSIX style\n                            module_str = f\"{destpath}/{container_subpath.as_posix()}\"\n                            break\n                    else:\n                        raise ValueError(\n                            f\"Module '{import_str}' not found in 'dependencies' list. \"\n                            \"Add its containing package to 'dependencies' list.\"\n                        )\n            # update the config\n            if isinstance(data, dict):\n                config[\"graphs\"][graph_id][\"path\"] = f\"{module_str}:{attr_str}\"\n            else:\n                config[\"graphs\"][graph_id] = f\"{module_str}:{attr_str}\"\n\n\ndef _update_auth_path(\n    config_path: pathlib.Path, config: Config, local_deps: LocalDeps\n) -> None:\n    \"\"\"Update auth.path to use Docker container paths.\"\"\"\n    auth_conf = config.get(\"auth\")\n    if not auth_conf or not (path_str := auth_conf.get(\"path\")):\n        return\n","sourceCodeStart":898,"sourceCodeEnd":934,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/cli/langgraph_cli/config.py#L898-L934","documentation":"The graph module is an installed package (no slashes) but its containing package is not listed in the 'dependencies' array of langgraph.json, so the runtime container will not have it installed. The ValueError tells the user to add the package.","triggerScenarios":"Thrown at libs/cli/langgraph_cli/config.py:916 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the package containing the module to the 'dependencies' list in langgraph.json, e.g. \"dependencies\": [\".\", \"some-package\"].","If it is local code, use a relative file path ('./pkg/agent.py:graph') covered by a '.' dependency."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","contentChangedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}