{"record":{"id":"47df30a379219a8e","repo":"wasmerio/wasmer","slug":"no-app-name-specified-use-name-app-name","errorCode":null,"errorMessage":"No app name specified: use --name <app_name>","messagePattern":"No app name specified: use --name <app_name>","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"lib/cli/src/commands/app/create.rs","lineNumber":188,"sourceCode":"            volumes: None,\n            health_checks: None,\n            debug: None,\n            scaling: None,\n            locality: None,\n            redirect: None,\n            extra: IndexMap::new(),\n            jobs: None,\n        }\n    }\n\n    async fn get_app_name(&self) -> anyhow::Result<String> {\n        if let Some(name) = &self.app_name {\n            return Ok(name.clone());\n        }\n\n        if self.non_interactive {\n            // if not interactive we can't prompt the user to choose the owner of the app.\n            anyhow::bail!(\"No app name specified: use --name <app_name>\");\n        }\n\n        let default_name = match &self.app_dir_path {\n            Some(path) => path\n                .file_name()\n                .and_then(|f| f.to_str())\n                .map(|s| s.to_owned()),\n            None => env::current_dir().ok().and_then(|dir| {\n                dir.file_name()\n                    .and_then(|f| f.to_str())\n                    .map(|s| s.to_owned())\n            }),\n        };\n\n        crate::utils::prompts::prompt_for_app_ident(\n            \"What should be the name of the app?\",\n            default_name.as_deref(),\n        )","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/cli/src/commands/app/create.rs#L170-L206","documentation":"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.","triggerScenarios":"Running `wasmer app create` with --non-interactive (or in an environment where stdin is unavailable) without passing --app-name (or --name).","commonSituations":"CI pipelines, Docker builds, or scripts deploying apps non-interactively without the name flag.","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."],"exampleFix":"// before\n// wasmer app create --non-interactive --owner me\n// after\n// wasmer app create --non-interactive --owner me --name my-app","handlingStrategy":"validation","validationCode":"if process.env.CI || !process.stdin.isTTY {\n  if (!args.appName) throw new Error('app name required in non-interactive mode');\n}","typeGuard":"fn has_app_name(args: &CreateArgs) -> bool {\n    args.app_name.as_deref().map(|s| !s.trim().is_empty()).unwrap_or(false)\n}","tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"No app name specified\") => {\n        eprintln!(\"re-run with --name <app_name>\");\n        std::process::exit(2);\n    }\n    other => other?,\n}","preventionTips":["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."],"tags":["wasmer","cli","app-deploy","non-interactive"],"backgroundTag":"missing-required-cli-argument","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}