{"record":{"id":"e08919ba1609476f","repo":"abpframework/abp","slug":"module-not-found","errorCode":null,"errorMessage":"Module not found!","messagePattern":"Module not found!","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ModuleInfoProvider.cs","lineNumber":41,"sourceCode":"        ICancellationTokenProvider cancellationTokenProvider,\n        IRemoteServiceExceptionHandler remoteServiceExceptionHandler,\n        CliHttpClientFactory cliHttpClientFactory)\n    {\n        JsonSerializer = jsonSerializer;\n        CancellationTokenProvider = cancellationTokenProvider;\n        RemoteServiceExceptionHandler = remoteServiceExceptionHandler;\n        _cliHttpClientFactory = cliHttpClientFactory;\n    }\n\n    public async Task<ModuleInfo> GetAsync(string name)\n    {\n        var moduleList = await GetModuleListInternalAsync();\n\n        var module = moduleList.FirstOrDefault(m => m.Name == name);\n\n        if (module == null)\n        {\n            throw new Exception(\"Module not found!\");\n        }\n\n        return module;\n    }\n\n    public async Task<List<ModuleInfo>> GetModuleListAsync()\n    {\n        return await GetModuleListInternalAsync();\n    }\n\n    private async Task<List<ModuleInfo>> GetModuleListInternalAsync()\n    {\n        var client = _cliHttpClientFactory.CreateClient();\n\n        using (var responseMessage = await client.GetAsync(\n            $\"{CliUrls.WwwAbpIo}api/download/modules/\",\n            CancellationTokenProvider.Token\n        ))","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/abpframework/abp/blob/7ed43b1931b9df46a50c0c59148a18645641d0df/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ModuleInfoProvider.cs#L23-L59","documentation":"Thrown by `ModuleInfoProvider.GetAsync` when the module list fetched from abp.io does not contain an entry whose `Name` equals the requested module name. It is a raw `Exception`.","triggerScenarios":"Running `abp add-module <name>` (or the underlying provider) with a module name that is not in the remote module list — typo, wrong casing, or an unavailable/nonexistent module.","commonSituations":"Typo in the module name; using a commercial module name on a non-commercial account; module deprecated/renamed; network issue returning a partial list so the name is not found.","solutions":["List available modules (via `abp add-module` help or the abp.io module list) and use the exact name.","Check casing and spelling of the module name argument.","Ensure network connectivity so the full module list is fetched; retry on transient failures."],"exampleFix":"# before\nabp add-module Idenity\n# after\nabp add-module Identity","handlingStrategy":"validation","validationCode":"var modules = await moduleInfoProvider.GetModuleListAsync();\nif (!modules.Any(m => string.Equals(m.Name, name, StringComparison.OrdinalIgnoreCase)))\n    throw new ArgumentException($\"Module '{name}' not found. Available: {string.Join(\", \", modules.Select(m => m.Name))}\");","typeGuard":"static async Task<bool> ModuleExistsAsync(ModuleInfoProvider provider, string name)\n{\n    var list = await provider.GetModuleListAsync();\n    return list.Any(m => string.Equals(m.Name, name, StringComparison.OrdinalIgnoreCase));\n}","tryCatchPattern":"try { await moduleInfoProvider.GetAsync(name); }\ncatch (Exception ex) when (ex.Message == \"Module not found!\")\n{\n    logger.LogError(\"Module '{Name}' not found. Check spelling and license.\", name);\n    throw;\n}","preventionTips":["List available modules before scripting `abp add-module`.","Match exact casing of the published module name.","Handle transient network failures that truncate the module list."],"tags":["cli","modules","abp-io","not-found","validation"],"backgroundTag":null,"analyzedSha":"7ed43b1931b9df46a50c0c59148a18645641d0df","analyzedAt":"2026-08-13T16:26:11.351Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}