{"record":{"id":"2238095d53b10887","repo":"langchain-ai/langgraph","slug":"package-name-resolved-name-contains-a-hyphen","errorCode":null,"errorMessage":"Package name '{resolved.name}' contains a hyphen. Rename the directory to use it as flat-layout package.","messagePattern":"Package name '(.+?)' contains a hyphen\\. Rename the directory to use it as flat-layout package\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/cli/langgraph_cli/config.py","lineNumber":786,"sourceCode":"        if \"pyproject.toml\" in files or \"setup.py\" in files:\n            # real package\n\n            # assign a unique folder name\n            container_name = resolved.name\n            if counter[container_name] > 0:\n                container_name += f\"_{counter[container_name]}\"\n            counter[container_name] += 1\n            # add to deps\n            real_pkgs[resolved] = (local_dep, container_name)\n            # set working_dir\n            if local_dep == \".\":\n                working_dir = f\"/deps/{container_name}\"\n        else:\n            # We could not find a pyproject.toml or setup.py, so treat as a faux package\n            if any(file == \"__init__.py\" for file in files):\n                # flat layout\n                if \"-\" in resolved.name:\n                    raise ValueError(\n                        f\"Package name '{resolved.name}' contains a hyphen. \"\n                        \"Rename the directory to use it as flat-layout package.\"\n                    )\n                check_reserved(resolved.name, local_dep)\n                container_path = f\"/deps/outer-{resolved.name}/{resolved.name}\"\n            else:\n                # src layout\n                container_path = f\"/deps/outer-{resolved.name}/src\"\n                for file in files:\n                    rfile = resolved / file\n                    if (\n                        rfile.is_dir()\n                        and file != \"__pycache__\"\n                        and not file.startswith(\".\")\n                    ):\n                        try:\n                            for subfile in os.listdir(rfile):\n                                if subfile.endswith(\".py\"):","sourceCodeStart":768,"sourceCodeEnd":804,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/cli/langgraph_cli/config.py#L768-L804","documentation":"Error \"Package name '{resolved.name}' contains a hyphen. Rename the directory to use it as flat-layout package.\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/cli/langgraph_cli/config.py:786 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"}