langflow-ai/langflow · error · SystemExit
In-tree provider directory not found: {in_tree}
Error message
In-tree provider directory not found: {in_tree} What it means
Second eligibility guard in port_bundle.py: after the name passes the regex, the script requires an in-tree provider directory at LFX_COMPONENTS/<bundle> to exist. port_bundle.py is a mechanical port of an existing in-tree provider, not a generator for brand-new bundles; if the source folder is absent it exits with 'In-tree provider directory not found: <path>'.
Source
Thrown at scripts/migrate/port_bundle.py:680
bundle: str,
*,
display_name: str | None,
migration_release: str | None,
discover_consumers: bool,
) -> PortPlan:
"""Refuse early if the candidate is not eligible for the mechanical port."""
if not re.fullmatch(r"[a-z][a-z0-9_]{1,63}", bundle):
msg = (
f"--bundle {bundle!r} is not a valid bundle name (lowercase "
"snake_case, 2-64 chars, starts with a letter). This script "
"ports an in-tree provider folder named exactly the same."
)
raise SystemExit(msg)
in_tree = LFX_COMPONENTS / bundle
if not in_tree.is_dir():
msg = f"In-tree provider directory not found: {in_tree}"
raise SystemExit(msg)
bundle_dir = BUNDLES_DIR / bundle
if bundle_dir.exists():
msg = f"Bundle directory already exists: {bundle_dir}. Refusing to overwrite."
raise SystemExit(msg)
deactivated_dup = LFX_COMPONENTS / "deactivated" / bundle
if deactivated_dup.is_dir():
msg = (
f"A deactivated duplicate exists at {deactivated_dup}. Resolve "
"the duplicate manually before porting -- see "
"src/bundles/PORTING.md § 0."
)
raise SystemExit(msg)
component_files: list[ComponentFile] = []
nested_subdirs: list[Path] = []
for src in sorted(in_tree.iterdir()):View on GitHub (pinned to 976ec789d2)
Solutions
- Check the path printed in the error and list its parent to find the real directory name.
- Switch to the branch/commit that still contains the in-tree provider, or restore it via git.
- If the provider is not in-tree at all, do not use port_bundle.py — create the bundle scaffold manually per src/bundles/PORTING.md.
Example fix
# before python scripts/migrate/port_bundle.py --bundle helpers # error: In-tree provider directory not found: src/lfx/src/lfx/components/helpers # after ls src/lfx/src/lfx/components # find the real name, e.g. 'helper' python scripts/migrate/port_bundle.py --bundle helper
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
LFX_COMPONENTS = Path("src/lfx/src/lfx/components")
def in_tree_provider_exists(bundle: str) -> bool:
return (LFX_COMPONENTS / bundle).is_dir() Prevention
- port_bundle.py only ports providers that currently exist in-tree; restore the folder from git before re-porting.
- For brand-new (never in-tree) bundles, follow src/bundles/PORTING.md manually instead of forcing this script.
When it happens
Trigger: Running port_bundle.py --bundle <name> where <name> has no folder under the lfx components directory — typo, the provider was already ported and removed from the tree, or the name refers to an external bundle that was never in-tree.
Common situations: Retrying a port after the source tree was already cleaned up; wrong working copy/branch where the provider lives elsewhere; confusion between the components dir and the bundles dir.
Related errors
- provider directory not found: {src}
- No ``*.py`` files under {in_tree}; nothing to port.
- destination already exists (already consolidated?): {dst}
- --bundle {bundle!r} is not a valid bundle name (lowercase sn
- Bundle directory already exists: {bundle_dir}. Refusing to
AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14).
Data as JSON: /api/errors/8808fd6ac551a9ac.
Report an issue: GitHub.