{"record":{"id":"657a315dd5d7bb01","repo":"abpframework/abp","slug":"module-name-is-missing-657a31","errorCode":null,"errorMessage":"Module name is missing!","messagePattern":"Module name is missing!","errorType":"validation","errorClass":"CliUsageException","httpStatus":null,"severity":"error","filePath":"framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GetSourceCommand.cs","lineNumber":34,"sourceCode":"    public const string Name = \"get-source\";\n    \n    private readonly SourceCodeDownloadService _sourceCodeDownloadService;\n    public ModuleProjectBuilder ModuleProjectBuilder { get; }\n\n    public ILogger<NewCommand> Logger { get; set; }\n\n    public GetSourceCommand(ModuleProjectBuilder moduleProjectBuilder, SourceCodeDownloadService sourceCodeDownloadService)\n    {\n        _sourceCodeDownloadService = sourceCodeDownloadService;\n        ModuleProjectBuilder = moduleProjectBuilder;\n        Logger = NullLogger<NewCommand>.Instance;\n    }\n\n    public async Task ExecuteAsync(CommandLineArgs commandLineArgs)\n    {\n        if (commandLineArgs.Target == null)\n        {\n            throw new CliUsageException(\n                \"Module name is missing!\" +\n                Environment.NewLine + Environment.NewLine +\n                GetUsageInfo()\n            );\n        }\n\n        var version = commandLineArgs.Options.GetOrNull(Options.Version.Short, Options.Version.Long);\n\n        var outputFolder = GetOutPutFolder(commandLineArgs);\n\n        var gitHubAbpLocalRepositoryPath = commandLineArgs.Options.GetOrNull(Options.GitHubAbpLocalRepositoryPath.Long);\n        if (gitHubAbpLocalRepositoryPath != null)\n        {\n            Logger.LogInformation(\"GitHub Abp Local Repository Path: \" + gitHubAbpLocalRepositoryPath);\n        }\n\n        var gitHubVoloLocalRepositoryPath = commandLineArgs.Options.GetOrNull(Options.GitHubVoloLocalRepositoryPath.Long);\n        if (gitHubVoloLocalRepositoryPath != null)","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/abpframework/abp/blob/7ed43b1931b9df46a50c0c59148a18645641d0df/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GetSourceCommand.cs#L16-L52","documentation":"Thrown by GetSourceCommand.ExecuteAsync when commandLineArgs.Target is null — meaning no module name was provided as the positional argument. The `abp get-source <ModuleName>` command requires a module name to download source code from ABP's source code service. The error includes usage info via GetUsageInfo().","triggerScenarios":"Running `abp get-source` without specifying a module name, or when the target is explicitly null. Any invocation where commandLineArgs.Target == null.","commonSituations":"Developer runs `abp get-source` alone expecting an interactive prompt, or a script omits the module name. Confusion about whether the module name is positional or an option.","solutions":["Provide the module name as a positional argument: `abp get-source Volo.Account`","Check the exact module name from ABP's module documentation or the source code download service listing","Use `abp get-source --help` to see the expected usage and available module names"],"exampleFix":"// before\nabp get-source\n\n// after\nabp get-source Volo.Account","handlingStrategy":"validation","validationCode":"// Validate module name before calling GetSourceCommand\nif (string.IsNullOrWhiteSpace(moduleName))\n{\n    Console.Error.WriteLine(\"Error: Module name is required. Example: abp get-source Volo.Account\");\n    return;\n}","typeGuard":null,"tryCatchPattern":"try\n{\n    await getSourceCommand.ExecuteAsync(commandLineArgs);\n}\ncatch (CliUsageException ex) when (ex.Message.Contains(\"Module name is missing\"))\n{\n    logger.LogError(\"Usage: abp get-source <ModuleName>\");\n}","preventionTips":["Always provide the module name as a positional argument","Look up the exact module name from ABP documentation before running","Validate script variables that supply the module name are not null or empty"],"tags":["cli","abp-cli","missing-argument","source-download","validation"],"backgroundTag":null,"analyzedSha":"7ed43b1931b9df46a50c0c59148a18645641d0df","analyzedAt":"2026-08-13T16:26:11.351Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}