{"record":{"id":"7ebfa1a3c1ae0c55","repo":"unionlabs/union","slug":"config-file-must-be-specified","errorCode":null,"errorMessage":"config file must be specified","messagePattern":"config file must be specified","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"voyager/src/cli.rs","lineNumber":78,"sourceCode":"                        config_file_path.to_string_lossy()\n                    )\n                })\n                .and_then(|s| match ext.map(OsStr::as_encoded_bytes) {\n                    Some(b\"jsonc\") => serde_jsonc::from_str::<Config>(&s).with_context(|| {\n                        format!(\n                            \"unable to parse the config file at `{}`\",\n                            config_file_path.to_string_lossy()\n                        )\n                    }),\n                    _ => serde_json::from_str::<Config>(&s).with_context(|| {\n                        format!(\n                            \"unable to parse the config file at `{}`\",\n                            config_file_path.to_string_lossy()\n                        )\n                    }),\n                })\n        }\n        None => Err(anyhow!(\"config file must be specified\")),\n    }\n}\n\n#[derive(Debug, Clone, Copy, PartialEq, Default, clap::ValueEnum, derive_more::Display)]\npub enum LogFormat {\n    #[default]\n    #[display(\"text\")]\n    Text,\n    #[display(\"json\")]\n    Json,\n}\n\n#[derive(Debug, Subcommand)]\n#[allow(clippy::large_enum_variant)]\npub enum Command {\n    /// Config related subcommands.\n    #[command(subcommand)]\n    Config(ConfigCmd),","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/unionlabs/union/blob/031785bb6dc6b957c624e62bc64c184409c97d7b/voyager/src/cli.rs#L60-L96","documentation":"voyager's CLI dispatch get_voyager_config received None for the config file path and immediately errors with 'config file must be specified'. Almost every voyager subcommand (run, plugin, msg, queue, …) resolves its configuration through this function, so running voyager without pointing it at a config file fails here before anything else happens. The path is a plain Option<OsString> argument (the VOYAGER_CONFIG_FILE_PATH env fallback is commented out in cli.rs), so it must be supplied explicitly.","triggerScenarios":"Invoking any config-dependent subcommand without the --config flag, e.g. 'voyager plugin info <name>' or 'voyager run' with no positional/config argument; scripts that assumed an env-var default (currently disabled); shell aliases dropping the flag.","commonSituations":"Following docs that omitted --config; upgrading from a version where a config default or env var existed; copy-pasting a command template that used a different flag name.","solutions":["Pass the config file explicitly: voyager --config /path/to/voyager-config.json <subcommand> (check the exact flag with voyager --help).","If you want an env-var default, uncomment/implement the env = \"VOYAGER_CONFIG_FILE_PATH\" support in cli.rs rather than relying on it.","Generate a starting config with the schema/config default commands (e.g. the config default / config schema subcommands) if you don't have one yet.","Wrap repeated invocations in a script that always exports and injects the config path."],"exampleFix":"# before\nvoyager plugin info client-eth\n\n# after\nvoyager --config ./voyager-config.json plugin info client-eth","handlingStrategy":"validation","validationCode":"// Rust caller-side guard before shelling out\nlet cfg = std::path::Path::new(config_path);\nanyhow::ensure!(cfg.is_file(), \"missing config file: {}\", cfg.display());\nlet cmd = format!(\"voyager --config {} {subcommand}\", cfg.display());","typeGuard":"fn has_config_arg(argv: &[OsString]) -> bool {\n    argv.iter().skip(1).any(|a| a == \"--config\" || a.to_string_lossy().starts_with(\"--config=\"))\n}","tryCatchPattern":"let config = get_voyager_config(app.config_file_path.as_deref())\n    .context(\"voyager needs --config; run `voyager --help` for usage\")?;","preventionTips":["Always invoke voyager through a wrapper that injects --config.","Add a config-presence assert in deployment scripts before any voyager call."],"tags":["voyager","cli","configuration","rust"],"backgroundTag":null,"analyzedSha":"031785bb6dc6b957c624e62bc64c184409c97d7b","analyzedAt":"2026-08-16T06:24:09.996Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}