npm search: Usage, Options & Common Errors
Find packages in the registry by keyword.
npm search queries the registry for packages matching one or more search terms and prints name, description, author, and version.
What it does
Sends the terms to the registry search endpoint and lists matches. --json returns structured results. It depends on the registry implementing a search API - many private/proxy registries do not.
Common usage
Terminal
npm search testing framework
npm search react-router --json
npm search --registry=https://registry.npmjs.org/ eslint-configCommon CI error: search unsupported on private registry
npm search errors or returns nothing against a private/proxy registry (e.g. Artifactory, Verdaccio) that does not implement the search endpoint. Point search at the public registry explicitly, or use npm view for an exact package name instead of search.
Terminal
npm search --registry=https://registry.npmjs.org/ my-termRelated guides
npm view: Usage, Options & Outputnpm view (npm info) queries registry metadata - versions, dist-tags, dependencies - for any package. Usage, f…
npm ENOTFOUND "request to … failed, reason: getaddrinfo ENOTFOUND" - Fix in CIFix npm ENOTFOUND "getaddrinfo ENOTFOUND registry.npmjs.org" in CI - a DNS resolution failure reaching the re…
npm config: Usage, Options & Common Errorsnpm config gets and sets npm settings and writes .npmrc. Usage for registry, tokens, and cache, plus the env-…