wasmerio/wasmer · error · anyhow::Error
No app name specified: use --name <app_name>
Error message
No app name specified: use --name <app_name>
What it means
During `wasmer app create`, get_app_name resolves the app name from --app-name or an interactive prompt. In non-interactive mode prompting is impossible, so it bails demanding an explicit name. The library throws it to avoid guessing a name in CI/automation.
Source
Thrown at lib/cli/src/commands/app/create.rs:188
volumes: None,
health_checks: None,
debug: None,
scaling: None,
locality: None,
redirect: None,
extra: IndexMap::new(),
jobs: None,
}
}
async fn get_app_name(&self) -> anyhow::Result<String> {
if let Some(name) = &self.app_name {
return Ok(name.clone());
}
if self.non_interactive {
// if not interactive we can't prompt the user to choose the owner of the app.
anyhow::bail!("No app name specified: use --name <app_name>");
}
let default_name = match &self.app_dir_path {
Some(path) => path
.file_name()
.and_then(|f| f.to_str())
.map(|s| s.to_owned()),
None => env::current_dir().ok().and_then(|dir| {
dir.file_name()
.and_then(|f| f.to_str())
.map(|s| s.to_owned())
}),
};
crate::utils::prompts::prompt_for_app_ident(
"What should be the name of the app?",
default_name.as_deref(),
)View on GitHub (pinned to 8c4b9ee9d3)
Solutions
- Pass the name explicitly: add --app-name <app_name> (alias --name) to the command.
- Remove --non-interactive to allow an interactive prompt.
- In automation, derive the name from the directory and pass it explicitly.
Example fix
// before // wasmer app create --non-interactive --owner me // after // wasmer app create --non-interactive --owner me --name my-app
Defensive patterns
Strategy: validation
Validate before calling
if process.env.CI || !process.stdin.isTTY {
if (!args.appName) throw new Error('app name required in non-interactive mode');
} Type guard
fn has_app_name(args: &CreateArgs) -> bool {
args.app_name.as_deref().map(|s| !s.trim().is_empty()).unwrap_or(false)
} Try / catch
match result {
Err(e) if e.to_string().contains("No app name specified") => {
eprintln!("re-run with --name <app_name>");
std::process::exit(2);
}
other => other?,
} Prevention
- Always pass --app-name/--name in CI and scripts.
- Detect non-TTY environments up front and supply all interactive inputs as flags.
- Keep app names in deploy config files and read them into the command.
When it happens
Trigger: Running `wasmer app create` with --non-interactive (or in an environment where stdin is unavailable) without passing --app-name (or --name).
Common situations: CI pipelines, Docker builds, or scripts deploying apps non-interactively without the name flag.
Related errors
- No owner specified: use --owner <owner>
- No template selected
- Stopping as the directory is not empty
- The --use_local_manifest flag was passed, but path {} does n
- Template '{template}' not found in the registry
AI-assisted analysis of wasmerio/wasmer@8c4b9ee9d3 (2026-09-01).
Data as JSON: /api/errors/47df30a379219a8e.
Report an issue: GitHub.