www.LinuxHowtos.org
NP-VIEW
Section: (1)Updated: October 2025
Index Return to Main Contents
NAME
np-view- View registry infoSynopsis
-
npm view [lB]<packag-spec>[rB] [lB]<field>[lB].subfield[rB]...[rB] aliases: info, show, v
Description
This command shows data about a package and prints it to stdout. As an example, to view information about the connect package from the registry, you would run:-
npm view connect
-
npm view ronn@0.3.5 dependencies
-
npm view . dependencies
-
npm view npm repository.url
-
npm view opts@$(npm view ronn dependencies.opts)
-
npm view express contributors.email
-
npm view express contributors[lB]0[rB].email
-
npm view express time'[lB]4.8.0[rB]'
-
npm view express contributors.name contributors.email
-
npm view npm contributors
-
npm view yui3@'>0.5.4' dependencies.jsdom
-
npm view connect versions
Configuration
json
-
- *
- Default: false
- *
- Type: Boolean
Whether or not to output JSON data, rather than the normal output.
-
- *
- In npm pkg set it enables parsing set values with JSON.parse() before saving them to your package.json.
Not supported by all npm commands.
workspace
-
- *
- Default:
- *
- Type: String (can be set multiple times)
Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. Valid values for the workspace config are either:
-
- *
- Workspace names
- *
- Path to a workspace directory
- *
- Path to a parent workspace directory (will result in selecting all workspaces within that folder)
When set for the npm init command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. This value is not exported to the environment for child processes.
workspaces
-
- *
- Default: null
- *
- Type: null or Boolean
Set to true to run the command in the context of all configured workspaces. Explicitly setting this to false will cause commands like install to ignore workspaces altogether. When not set explicitly:
-
- *
- Commands that operate on the node_modules tree (install, update, etc.) will link workspaces into the node_modules folder.- Commands that do other things (test, exec, publish, etc.) will operate on the root project, unless one or more workspaces are specified in the workspace config.
This value is not exported to the environment for child processes.
includ-workspac-root
-
- *
- Default: false
- *
- Type: Boolean
Include the workspace root when workspaces are enabled for a command. When false, specifying individual workspaces via the workspace config, or all workspaces via the workspaces flag, will cause npm to operate only on the specified workspaces, and not on the root project. This value is not exported to the environment for child processes.
Output
If only a single string field for a single version is output, then it will not be colorized or quoted, to enable piping the output to another command. If the field is an object, it will be output as a JavaScript object literal. If the -json flag is given, the outputted fields will be JSON. If the version range matches multiple versions then each printed value will be prefixed with the version it applies to. If multiple fields are requested, then each of them is prefixed with the field name.See Also
-
- *
- npm help "package spec"
- *
- npm help search
- *
- npm help registry
- *
- npm help config
- *
- npm help npmrc
- *
- npm help docs