{"record":{"id":"8eef14d9a60dd290","repo":"nodejs/node","slug":"no-dependencies-found-matching-args-join","errorCode":null,"errorMessage":"No dependencies found matching ${args.join(', ')}","messagePattern":"No dependencies found matching (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"deps/npm/lib/commands/explain.js","lineNumber":56,"sourceCode":"      this.filterSet = arb.workspaceDependencySet(tree, this.workspaceNames)\n    } else if (!this.npm.flatOptions.workspacesEnabled) {\n      this.filterSet =\n        arb.excludeWorkspacesDependencySet(tree)\n    }\n\n    const nodes = new Set()\n    for (const arg of args) {\n      for (const node of this.getNodes(tree, arg)) {\n        const filteredOut = this.filterSet\n          && this.filterSet.size > 0\n          && !this.filterSet.has(node)\n        if (!filteredOut) {\n          nodes.add(node)\n        }\n      }\n    }\n    if (nodes.size === 0) {\n      throw new Error(`No dependencies found matching ${args.join(', ')}`)\n    }\n\n    const expls = []\n    for (const node of nodes) {\n      const { extraneous, dev, optional, devOptional, peer, inBundle, overridden } = node\n      const expl = node.explain()\n      if (extraneous) {\n        expl.extraneous = true\n      } else {\n        expl.dev = dev\n        expl.optional = optional\n        expl.devOptional = devOptional\n        expl.peer = peer\n        expl.bundled = inBundle\n        expl.overridden = overridden\n      }\n      expls.push(expl)\n    }","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/npm/lib/commands/explain.js#L38-L74","documentation":"`npm explain <spec>...` collects tree nodes matching each argument, applying any --workspace filter. If the resulting node set is empty (no arg matched anything, or all matches were filtered out) it throws naming the requested args.","triggerScenarios":"Running `npm explain <pkg>` where <pkg> is not installed in the current tree; a typo; a dep present only under a workspace excluded by your --workspace filter.","commonSituations":"Querying a transitive dep that was deduped/removed; wrong package name; running explain from the wrong directory (no node_modules).","solutions":["Confirm the dependency is installed: `npm ls <pkg>`","Correct the spec or package name spelling","Drop or widen the --workspace filter if it is excluding the matching node","Run `npm install` first if the tree is incomplete"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"async function depExplainable(arborist, args, filterSet) {\n  const tree = await arborist.loadActual()\n  let matched = 0\n  for (const arg of args) for (const node of getNodes(tree, arg)) {\n    if (!filterSet || filterSet.size === 0 || filterSet.has(node)) matched++\n  }\n  return matched > 0\n}","typeGuard":"function anyNodeMatches(nodes) { return nodes.size > 0 }","tryCatchPattern":"try {\n  await runNpm('explain', args)\n} catch (e) {\n  if (/No dependencies found/.test(e.message)) { await runNpm('ls') /* inspect tree */ }\n  else throw e\n}","preventionTips":["Run `npm ls <pkg>` to confirm presence before `npm explain`","Run explain from the project root that contains node_modules","Drop or widen --workspace filters that may exclude the target node"],"tags":["explain","dependencies","cli","dependency-tree"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}