langchain-ai/langgraph · error · IsADirectoryError
Auth path must be a file
Error message
Auth path must be a file: {resolved} What it means
Raised during langgraph.json config preparation when the auth.path entry uses the relative 'module:attribute' form but the resolved file (config directory joined with the module path) does not exist on disk. It is a config-validation failure: the file pointing to your auth implementation is missing or misnamed, not a runtime auth error. Fix the path in langgraph.json or create the referenced file.
Solutions
- Point auth.path at the specific .py file, e.g. './auth.py:auth'.
- Include the ':<attribute>' suffix.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at libs/cli/langgraph_cli/config.py:943 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of langchain-ai/langgraph@38031739e5 (2026-08-26).
Data as JSON: /api/errors/4d2f396537ca6062.
Report an issue: GitHub.
Appendix: source
Thrown at libs/cli/langgraph_cli/config.py:943
def _update_auth_path(
config_path: pathlib.Path, config: Config, local_deps: LocalDeps
) -> None:
"""Update auth.path to use Docker container paths."""
auth_conf = config.get("auth")
if not auth_conf or not (path_str := auth_conf.get("path")):
return
module_str, sep, attr_str = path_str.partition(":")
if not sep or not module_str.startswith("."):
return # Already validated or absolute path
resolved = config_path.parent / module_str
if not resolved.exists():
raise FileNotFoundError(f"Auth file not found: {resolved} (from {path_str})")
if not resolved.is_file():
raise IsADirectoryError(f"Auth path must be a file: {resolved}")
# Check faux packages first (higher priority)
for faux_path, (_, destpath) in local_deps.faux_pkgs.items():
if resolved.is_relative_to(faux_path):
new_path = f"{destpath}/{resolved.relative_to(faux_path)}:{attr_str}"
auth_conf["path"] = new_path
return
# Check real packages
for real_path in local_deps.real_pkgs:
if resolved.is_relative_to(real_path):
new_path = (
f"/deps/{real_path.name}/{resolved.relative_to(real_path)}:{attr_str}"
)
auth_conf["path"] = new_path
return
raise ValueError(View on GitHub (pinned to 38031739e5)