inspect

npm view (info)

Fetches package metadata straight from the registry — versions, maintainers, dist-tags, dependencies, and more. Aliases: `info`, `show`, `v`.

npm view <pkg>[@<version>] [<field>[.<subfield>...]]

Common flags

Flag Purpose
--json Emit the raw metadata as JSON
--registry <url> Query a specific registry

Examples

npm view react versions

List every published version of react

npm view react@latest

Show metadata for the latest release

npm view react dist-tags

See which versions are tagged latest/next/etc.

npm view lodash description homepage

Print two specific fields

Gotcha

Without a version specifier `npm view` targets the `latest` dist-tag, which may not be the newest published version if a maintainer holds it back. Use `npm view versions --json | tail` for the true chronological latest.

Related commands

← All npm commands · npm vs pnpm vs Yarn · Fix Node OOM