{"record":{"id":"b7253165b4227ef9","repo":"upstash/context7","slug":"no-dependencies-detected","errorCode":null,"errorMessage":"No dependencies detected","messagePattern":"No dependencies detected","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"packages/cli/src/commands/skill.ts","lineNumber":836,"sourceCode":"  }\n\n  log.plain(\n    `${pc.bold(\"Quick commands:\")}\\n` +\n      `  Install all: ${pc.cyan(`ctx7 skills install ${repo} --all`)}\\n` +\n      `  Install one: ${pc.cyan(`ctx7 skills install ${repo} ${data.skills[0]?.name}`)}\\n`\n  );\n}\n\nasync function suggestCommand(options: SuggestOptions): Promise<void> {\n  trackEvent(\"command\", { name: \"suggest\" });\n  log.blank();\n\n  // Step 1: Detect dependencies\n  const scanSpinner = ora(\"Scanning project dependencies...\").start();\n  const deps = await detectProjectDependencies(process.cwd());\n\n  if (deps.length === 0) {\n    scanSpinner.warn(pc.yellow(\"No dependencies detected\"));\n    log.info(`Try ${pc.cyan(\"ctx7 skills search <keyword>\")} to search manually`);\n    return;\n  }\n\n  scanSpinner.succeed(`Found ${deps.length} dependencies`);\n\n  // Step 2: Single API call to backend\n  const searchSpinner = ora(\"Finding matching skills...\").start();\n\n  const accessToken = await getValidAccessToken();\n\n  let data;\n  try {\n    data = await suggestSkills(deps, accessToken);\n  } catch {\n    searchSpinner.fail(pc.red(\"Failed to connect to Context7\"));\n    return;\n  }","sourceCodeStart":818,"sourceCodeEnd":854,"githubUrl":"https://github.com/upstash/context7/blob/5284672feb575908efead6fcf1b5e542f8d607bb/packages/cli/src/commands/skill.ts#L818-L854","documentation":"Emitted by `ctx7 skills suggest` at step 1 when detectProjectDependencies(process.cwd()) returned an empty array — the scanner found no supported dependency manifest in the current working directory, so there is nothing to match skills against. The CLI hints at manual search (`ctx7 skills search <keyword>`) and returns before any backend call or auth is attempted.","triggerScenarios":"Run `ctx7 skills suggest` in an empty directory, home dir, or a folder without package.json/pyproject.toml/go.mod etc.; run it from a subdirectory (e.g. packages/web) while the manifest sits at the repo root; project uses a manifest format the detector does not support.","commonSituations":"Running the CLI from the wrong cwd (nested folder, git bare repo); scaffolding a brand-new project before adding dependencies; polyglot repos where the detector only recognizes specific manifests; shell configured to start in ~.","solutions":["cd to the project root that actually contains package.json (or the equivalent manifest) and re-run","If you already know the stack, use manual search: `ctx7 skills search <keyword>`","Add/commit a dependency manifest for your stack, then retry suggest","Verify with `ls` that a manifest file exists in the exact directory you are invoking from"],"exampleFix":"# before\n$ cd packages/web && ctx7 skills suggest\nNo dependencies detected\n\n# after\n$ cd /path/to/repo-root && ctx7 skills suggest","handlingStrategy":"validation","validationCode":"// Confirm a supported manifest exists in cwd before running suggest\nimport { access } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nconst MANIFESTS = [\"package.json\", \"pyproject.toml\", \"go.mod\", \"Cargo.toml\", \"composer.json\"];\nasync function hasManifest(cwd: string): Promise<boolean> {\n  for (const m of MANIFESTS) {\n    try {\n      await access(join(cwd, m));\n      return true;\n    } catch {}\n  }\n  return false;\n}\nif (!(await hasManifest(process.cwd()))) {\n  console.error(\"Run from the project root containing a dependency manifest\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Invoke ctx7 from the repo root, not a nested package folder","Keep at least one standard manifest in the project root","When no manifest is possible, script `ctx7 skills search <keyword>` instead of suggest"],"tags":["cli","skills","suggest","dependency-detection","cwd"],"backgroundTag":"missing-dependency-manifest","analyzedSha":"5284672feb575908efead6fcf1b5e542f8d607bb","analyzedAt":"2026-08-18T18:00:18.510Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}