upstash/context7 · warning
Failed to download
Error message
Failed to download ${skill.name}: ${downloadData.error} What it means
During skill installation, the registry download API may return a payload with an error field (e.g. skill not available, registry-side failure). The install command logs "Failed to download <skill>: <error>" and skips that skill via continue, leaving the spinner running for the next skill instead of throwing.
Solutions
- Check the logged error text and verify the skill/project names with the search/list command.
- Retry later if the error indicates rate limiting or a registry outage.
- Update the Context7 CLI to refresh the skill catalog.
- Select a different/renamed skill if the original was removed upstream.
Example fix
// before context7 skill install my-skill // name typo -> downloadData.error // after context7 skill search my-skill // confirm exact name context7 skill install correct-skill-name
Defensive patterns
Strategy: try-catch
Validate before calling
const skills = await searchSkills(query);
if (!skills.some(s => s.project === project && s.name === name)) {
console.warn(`Skill ${project}/${name} not found; check spelling`);
} Type guard
function hasDownloadError(d: { error?: string } | null): d is { error: string } {
return d !== null && typeof d.error === 'string' && d.error.length > 0;
} Try / catch
for (const skill of selectedSkills) {
const data = await downloadSkill(skill.project, skill.name).catch(e => ({ error: String(e) }));
if (hasDownloadError(data)) {
failures.push({ skill: skill.name, reason: data.error }); // retry later
continue;
}
await install(data);
} Prevention
- Verify skill names with the search/list command before batch installs
- Update the CLI so the skill catalog isn't stale
- Throttle batch installs to avoid registry rate limits
- Collect failures and retry after transient registry errors instead of aborting
When it happens
Trigger: downloadSkill(skill.project, skill.name) returns { error } — typically when the skill doesn't exist for that project, the registry API rejects the request (rate limit, auth issue), or the project/name is mistyped.
Common situations: Typo in skill or project name, the skill was removed/renamed upstream, registry outage or rate limiting, or an outdated CLI caching stale skill lists.
Related errors
- await describeErrorResponse(response, fallback)
- Cancelled
- Context7 base URL must not contain a query string or…
- Could not reach : )` : ""}\n
- Couldn't check for updates right now.
AI-assisted analysis of upstash/context7@4416fb855b (2026-09-16).
Data as JSON: /api/errors/397b317f6b00b888.
Report an issue: GitHub.
Appendix: source
Thrown at packages/cli/src/commands/skill.ts:417
log.warn("Installation cancelled");
return;
}
const targetDirs = getTargetDirs(targets);
const installSpinner = ora("Installing skills...").start();
let permissionError = false;
const failedDirs: Set<string> = new Set();
const installedSkills: string[] = [];
for (const skill of selectedSkills) {
try {
installSpinner.text = `Downloading ${skill.name}...`;
const downloadData = await downloadSkill(skill.project, skill.name);
if (downloadData.error) {
log.warn(`Failed to download ${skill.name}: ${downloadData.error}`);
continue;
}
installSpinner.text = `Installing ${skill.name}...`;
const [primaryDir, ...symlinkDirs] = targetDirs;
try {
await installSkillFiles(skill.name, downloadData.files, primaryDir);
} catch (dirErr) {
const error = dirErr as NodeJS.ErrnoException;
if (error.code === "EACCES" || error.code === "EPERM") {
permissionError = true;
failedDirs.add(primaryDir);
}
throw dirErr;
}
View on GitHub (pinned to 4416fb855b)