langchain-ai/langgraph · error · FileNotFoundError

Could not find local dependency

Error message

Could not find local dependency: {resolved}

What it means

Path resolution while the CLI processes local (dot-prefixed) dependencies in langgraph.json: the dependency path, resolved relative to the config file's parent directory, does not exist on disk. This usually means a typo in the relative path, a wrong working directory, or a missing submodule/checkout.

Solutions

  1. Fix the relative path in the dependencies array, e.g. "./my_lib" pointing at the actual folder next to langgraph.json
  2. Verify the path exists: ls <config_dir>/<dependency>
  3. Re-clone or restore the missing local package
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at libs/cli/langgraph_cli/config.py:754 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/3a8dd06964981f2d. Report an issue: GitHub.

Appendix: source

Thrown at libs/cli/langgraph_cli/config.py:754

    pip_reqs = []
    real_pkgs = {}
    faux_pkgs = {}
    working_dir: str | None = None
    additional_contexts: list[pathlib.Path] = []

    for local_dep in config["dependencies"]:
        if not local_dep.startswith("."):
            # If the dependency is not a local path, skip it
            continue

        # Verify that the local dependency can be resolved
        # (e.g., this would raise an informative error if a user mistyped a path).
        resolved = (config_path.parent / local_dep).resolve()

        # validate local dependency
        if not resolved.exists():
            raise FileNotFoundError(f"Could not find local dependency: {resolved}")
        elif not resolved.is_dir():
            raise NotADirectoryError(
                f"Local dependency must be a directory: {resolved}"
            )
        elif resolved == config_path.parent:
            pass
        elif config_path.parent not in resolved.parents:
            additional_contexts.append(resolved)

        # Check for pyproject.toml or setup.py
        # If found, treat as a real package, if not treat as a faux package.
        # For faux packages, we'll also check for presence of requirements.txt.
        files = os.listdir(resolved)
        if "pyproject.toml" in files or "setup.py" in files:
            # real package

            # assign a unique folder name
            container_name = resolved.name

View on GitHub (pinned to 38031739e5)