{"record":{"id":"9dcd156360ddb66e","repo":"langchain-ai/langgraph","slug":"configuration-file-config-path-is-not-under-the","errorCode":null,"errorMessage":"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, ","messagePattern":"Configuration file (.+?) is not under the build context (.+?)\\. Please run the command from a directory that contains your langgraph\\.json file, ","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/cli/langgraph_cli/config.py","lineNumber":1612,"sourceCode":"        full_tag = f\"{api_version}-{language}{version_distro_tag}\"\n    elif \"/langgraph-server\" in base_image and version_distro_tag not in base_image:\n        return f\"{base_image}-{language}{version_distro_tag}\"\n    else:\n        full_tag = version_distro_tag\n\n    return f\"{base_image}:{full_tag}\"\n\n\ndef _calculate_relative_workdir(config_path: pathlib.Path, build_context: str) -> str:\n    \"\"\"Calculate the relative path from build context to langgraph.json directory.\"\"\"\n    config_dir = config_path.parent.resolve()\n    build_context_path = pathlib.Path(build_context).resolve()\n\n    try:\n        relative_path = config_dir.relative_to(build_context_path)\n        return str(relative_path) if str(relative_path) != \".\" else \"\"\n    except ValueError as _:\n        raise ValueError(\n            f\"Configuration file {config_path} is not under the build context {build_context}. \"\n            f\"Please run the command from a directory that contains your langgraph.json file, \"\n        ) from None\n\n\ndef config_to_docker(\n    config_path: pathlib.Path,\n    config: Config,\n    *,\n    base_image: str | None = None,\n    api_version: str | None = None,\n    install_command: str | None = None,\n    build_command: str | None = None,\n    build_context: str | None = None,\n    escape_variables: bool = False,\n) -> tuple[str, dict[str, str]]:\n    base_image = base_image or default_base_image(config)\n","sourceCodeStart":1594,"sourceCodeEnd":1630,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/cli/langgraph_cli/config.py#L1594-L1630","documentation":"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.","triggerScenarios":"Thrown at libs/cli/langgraph_cli/config.py:1612 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"}