{"record":{"id":"86875ec96884828d","repo":"abpframework/abp","slug":"package-is-not-found-or-downloadable","errorCode":null,"errorMessage":"Package is not found or downloadable!","messagePattern":"Package is not found or downloadable!","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/NpmPackageInfoProvider.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<NpmPackageInfo> GetAsync(string name)\n    {\n        var packageList = await GetPackageListAsync();\n\n        var package = packageList.FirstOrDefault(m => m.Name == name);\n\n        if (package == null)\n        {\n            throw new Exception(\"Package is not found or downloadable!\");\n        }\n\n        return package;\n    }\n\n    public async Task<List<NpmPackageInfo>> GetPackageListAsync()\n    {\n        var client = _cliHttpClientFactory.CreateClient();\n\n        using (var responseMessage = await client.GetAsync(\n            $\"{CliUrls.WwwAbpIo}api/download/npmPackages/\",\n            CancellationTokenProvider.Token\n        ))\n        {\n            await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(responseMessage);\n            var result = await responseMessage.Content.ReadAsStringAsync();\n            return JsonSerializer.Deserialize<List<NpmPackageInfo>>(result);\n        }","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/abpframework/abp/blob/7ed43b1931b9df46a50c0c59148a18645641d0df/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/NpmPackageInfoProvider.cs#L23-L59","documentation":"Thrown by `NpmPackageInfoProvider.GetAsync` when the package list fetched from abp.io's npmPackages endpoint does not contain a package with the requested name. It is a raw `Exception`.","triggerScenarios":"Requesting npm package info (e.g. for LeptonX/theme packages) with a name not present in the remote npm package list.","commonSituations":"Typo in the npm package name; package renamed/deprecated; commercial package requested without entitlement; partial list returned due to network issues.","solutions":["Verify the exact npm package name on abp.io/npm and retry.","Check spelling and casing of the requested package name.","Confirm network connectivity so the full package list is returned; retry on transient failures."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"var packages = await npmProvider.GetPackageListAsync();\nif (!packages.Any(p => string.Equals(p.Name, name, StringComparison.OrdinalIgnoreCase)))\n    throw new ArgumentException($\"npm package '{name}' not found.\");","typeGuard":"static async Task<bool> NpmPackageExistsAsync(NpmPackageInfoProvider provider, string name)\n{\n    var list = await provider.GetPackageListAsync();\n    return list.Any(p => string.Equals(p.Name, name, StringComparison.OrdinalIgnoreCase));\n}","tryCatchPattern":"try { await npmProvider.GetAsync(name); }\ncatch (Exception ex) when (ex.Message.Contains(\"Package is not found\"))\n{\n    logger.LogError(\"npm package '{Name}' not found or not downloadable.\", name);\n    throw;\n}","preventionTips":["Verify the npm package name on abp.io before requesting it.","Confirm network connectivity for the full package list.","Check entitlement for commercial theme packages."],"tags":["cli","npm","packages","abp-io","not-found"],"backgroundTag":null,"analyzedSha":"7ed43b1931b9df46a50c0c59148a18645641d0df","analyzedAt":"2026-08-13T16:26:11.351Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}