Skip to main content

NPM View Dist Tags

Use the npm view command to view the versions and dist-tags for a package. The distribution tags provide a way to identify the latest version of a package. The npm view command can be used to view the versions and dist-tags for a package. They can also be used to determine the next version of a package during a release process.

syntax: npm view {{PACKAGE-NAME}} versions dist-tags --json --{{REGISTRY}} {{REGISTRY-URL}}

  • npm view: the npm command to view package information.
  • versions: use to indicate versions of the package should be retrieved
  • dist-tags: use to indicate dist-tags of the package should be retrieved
  • PACKAGE-NAME: the name of the package to view.
    • example: @nrwl/nx
  • REGISTRY: the registry to use with the REGISTRY-URL.
    • example: --registry https://registry.npmjs.org/
    • example: --@buildmotion:registyr https://npm.pkg.github.com/
  • --json: use to format the output as JSON.
# Use to view [versions] and [dist-tag] items for the package
# npm view {{package-name}} versions dist-tags --json --registry {{registry-url}}
npm view @nrwl/nx versions dist-tags --json --registry https://registry.npmjs.org/
npm view @nrwl/nx versions dist-tags --json