mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-11 04:07:52 +02:00
fix(cli): clarify missing deploy config (#8854)
Shows an actionable, docs-linked error when `langgraph deploy` is run without a `langgraph.json` instead of exposing a traceback.
This commit is contained in:
@@ -1603,6 +1603,16 @@ def _deploy_cmd(
|
||||
|
||||
# -- 1. Preflight --
|
||||
validate_deploy_commands(install_command, build_command)
|
||||
if not config.exists():
|
||||
message = (
|
||||
"We couldn't find a langgraph.json file. Run `langgraph deploy` from "
|
||||
"the root of a LangSmith Deployment project. To get started, visit "
|
||||
"https://docs.langchain.com/langsmith/deployment-quickstart."
|
||||
)
|
||||
if json_output:
|
||||
em.error(message)
|
||||
raise click.exceptions.Exit(1)
|
||||
raise click.ClickException(message)
|
||||
config_json = langgraph_cli.config.validate_config_file(config)
|
||||
warn_non_wolfi_distro(config_json, emit=em.note)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user