upstash/context7 · warning

No dependencies detected

Error message

No dependencies detected

What it means

The `ctx7 skill suggest` command (auto-detect flow) scans the current project for dependencies (detectProjectDependencies on process.cwd()). If nothing is detected, it warns and suggests a manual search instead. It indicates the project manifest (package.json, requirements.txt, etc.) is missing, unreadable, or lists no recognizable dependencies.

Solutions

  1. cd into the project root that contains package.json / other dependency manifests and re-run
  2. Add dependencies to the project manifest if the project is intentionally empty
  3. Use `ctx7 skills search <keyword>` for manual skill search as the message suggests
  4. Ensure the manifest format is one ctx7 recognizes (npm, pip, cargo, etc.)

Example fix

// before (empty dir)
$ ctx7 skill suggest
// after
$ cd ~/projects/my-app   # directory containing package.json
$ ctx7 skill suggest
Defensive patterns

Strategy: validation

Validate before calling

import { existsSync, readFileSync } from 'fs';
const manifest = ['package.json', 'requirements.txt', 'Cargo.toml', 'go.mod'].find(existsSync);
if (!manifest) {
  console.error('No dependency manifest in cwd; cd to the project root or run ctx7 skills search manually.');
  process.exit(1);
}

Prevention

When it happens

Trigger: Running `ctx7 skill suggest` in a directory with no dependency manifest, an empty manifest, or one using a format detectProjectDependencies does not recognize.

Common situations: Running in the wrong directory (parent of the actual project); brand-new project with no dependencies declared yet; monorepo where deps live in workspace subdirectories; unsupported manifest format.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of upstash/context7@4416fb855b (2026-09-16). Data as JSON: /api/errors/b7253165b4227ef9. Report an issue: GitHub.

Appendix: source

Thrown at packages/cli/src/commands/skill.ts:836

  }

  log.plain(
    `${pc.bold("Quick commands:")}\n` +
      `  Install all: ${pc.cyan(`ctx7 skills install ${repo} --all`)}\n` +
      `  Install one: ${pc.cyan(`ctx7 skills install ${repo} ${data.skills[0]?.name}`)}\n`
  );
}

async function suggestCommand(options: SuggestOptions): Promise<void> {
  trackEvent("command", { name: "suggest" });
  log.blank();

  // Step 1: Detect dependencies
  const scanSpinner = ora("Scanning project dependencies...").start();
  const deps = await detectProjectDependencies(process.cwd());

  if (deps.length === 0) {
    scanSpinner.warn(pc.yellow("No dependencies detected"));
    log.info(`Try ${pc.cyan("ctx7 skills search <keyword>")} to search manually`);
    return;
  }

  scanSpinner.succeed(`Found ${deps.length} dependencies`);

  // Step 2: Single API call to backend
  const searchSpinner = ora("Finding matching skills...").start();

  const accessToken = await getValidAccessToken();

  let data;
  try {
    data = await suggestSkills(deps, accessToken);
  } catch {
    searchSpinner.fail(pc.red("Failed to connect to Context7"));
    return;
  }

View on GitHub (pinned to 4416fb855b)