langchain-ai/langgraph · error · ValueError
Configuration file {config_path} is not under the build cont
Error message
Configuration file {config_path} is not under the build context {build_context}. Please run the command from a directory that contains your langgraph.json file, What it means
Error "Configuration file {config_path} is not under the build context {build_context}. Please run the command from a directory that contains your langgraph.json file, " thrown in langchain-ai/langgraph.
Source
Thrown at libs/cli/langgraph_cli/config.py:1612
full_tag = f"{api_version}-{language}{version_distro_tag}"
elif "/langgraph-server" in base_image and version_distro_tag not in base_image:
return f"{base_image}-{language}{version_distro_tag}"
else:
full_tag = version_distro_tag
return f"{base_image}:{full_tag}"
def _calculate_relative_workdir(config_path: pathlib.Path, build_context: str) -> str:
"""Calculate the relative path from build context to langgraph.json directory."""
config_dir = config_path.parent.resolve()
build_context_path = pathlib.Path(build_context).resolve()
try:
relative_path = config_dir.relative_to(build_context_path)
return str(relative_path) if str(relative_path) != "." else ""
except ValueError as _:
raise ValueError(
f"Configuration file {config_path} is not under the build context {build_context}. "
f"Please run the command from a directory that contains your langgraph.json file, "
) from None
def config_to_docker(
config_path: pathlib.Path,
config: Config,
*,
base_image: str | None = None,
api_version: str | None = None,
install_command: str | None = None,
build_command: str | None = None,
build_context: str | None = None,
escape_variables: bool = False,
) -> tuple[str, dict[str, str]]:
base_image = base_image or default_base_image(config)
View on GitHub (pinned to 38031739e5)
When it happens
Trigger: Thrown at libs/cli/langgraph_cli/config.py:1612 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/9dcd156360ddb66e.
Report an issue: GitHub.