{"record":{"id":"8808fd6ac551a9ac","repo":"langflow-ai/langflow","slug":"in-tree-provider-directory-not-found-in-tree","errorCode":null,"errorMessage":"In-tree provider directory not found: {in_tree}","messagePattern":"In-tree provider directory not found: (.+?)","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"scripts/migrate/port_bundle.py","lineNumber":680,"sourceCode":"    bundle: str,\n    *,\n    display_name: str | None,\n    migration_release: str | None,\n    discover_consumers: bool,\n) -> PortPlan:\n    \"\"\"Refuse early if the candidate is not eligible for the mechanical port.\"\"\"\n    if not re.fullmatch(r\"[a-z][a-z0-9_]{1,63}\", bundle):\n        msg = (\n            f\"--bundle {bundle!r} is not a valid bundle name (lowercase \"\n            \"snake_case, 2-64 chars, starts with a letter).  This script \"\n            \"ports an in-tree provider folder named exactly the same.\"\n        )\n        raise SystemExit(msg)\n\n    in_tree = LFX_COMPONENTS / bundle\n    if not in_tree.is_dir():\n        msg = f\"In-tree provider directory not found: {in_tree}\"\n        raise SystemExit(msg)\n\n    bundle_dir = BUNDLES_DIR / bundle\n    if bundle_dir.exists():\n        msg = f\"Bundle directory already exists: {bundle_dir}.  Refusing to overwrite.\"\n        raise SystemExit(msg)\n\n    deactivated_dup = LFX_COMPONENTS / \"deactivated\" / bundle\n    if deactivated_dup.is_dir():\n        msg = (\n            f\"A deactivated duplicate exists at {deactivated_dup}.  Resolve \"\n            \"the duplicate manually before porting -- see \"\n            \"src/bundles/PORTING.md § 0.\"\n        )\n        raise SystemExit(msg)\n\n    component_files: list[ComponentFile] = []\n    nested_subdirs: list[Path] = []\n    for src in sorted(in_tree.iterdir()):","sourceCodeStart":662,"sourceCodeEnd":698,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/scripts/migrate/port_bundle.py#L662-L698","documentation":"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>'.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before\npython scripts/migrate/port_bundle.py --bundle helpers\n# error: In-tree provider directory not found: src/lfx/src/lfx/components/helpers\n\n# after\nls src/lfx/src/lfx/components  # find the real name, e.g. 'helper'\npython scripts/migrate/port_bundle.py --bundle helper","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\nLFX_COMPONENTS = Path(\"src/lfx/src/lfx/components\")\n\ndef in_tree_provider_exists(bundle: str) -> bool:\n    return (LFX_COMPONENTS / bundle).is_dir()","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["migration","filesystem","validation","cli"],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}