/var/lang/lib/node_modules/npm/man/man1
This explorer reads the filesystem of the server it runs on, so /workspace/user isn't present here. Browsing and the terminal still work against this server's own disk from /.
.TH "NPM-EXPLAIN" "1" "February 2026" "NPM@11.11.0" "".SH "NAME"\fBnpm-explain\fR - Explain installed packages.SS "Synopsis".P.RS 2.nfnpm explain <package-spec> alias: why.fi.RE.SS "Description".PThis command will print the chain of dependencies causing a given package to be installed in the current project..PIf one or more package specs are provided, then only packages matching one of the specifiers will have their relationships explained..PThe package spec can also refer to a folder within \fB./node_modules\fR.PFor example, running \fBnpm explain glob\fR within npm's source tree will show:.P.RS 2.nfglob@7.1.6node_modules/glob glob@"^7.1.4" from the root project glob@7.1.1 devnode_modules/tacks/node_modules/glob glob@"^7.0.5" from rimraf@2.6.2 node_modules/tacks/node_modules/rimraf rimraf@"^2.6.2" from tacks@1.3.0 node_modules/tacks dev tacks@"^1.3.0" from the root project.fi.RE.PTo explain just the package residing at a specific folder, pass that as the argument to the command. This can be useful when trying to figure out exactly why a given dependency is being duplicated to satisfy conflicting version requirements within the project..P.RS 2.nf$ npm explain node_modules/nyc/node_modules/find-upfind-up@3.0.0 devnode_modules/nyc/node_modules/find-up find-up@"^3.0.0" from nyc@14.1.1 node_modules/nyc nyc@"^14.1.1" from tap@14.10.8 node_modules/tap dev tap@"^14.10.8" from the root project.fi.RE.SS "Configuration".SS "\fBjson\fR".RS 0.IP \(bu 4Default: false.IP \(bu 4Type: Boolean.RE 0 .PWhether or not to output JSON data, rather than the normal output..RS 0.IP \(bu 4In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR..RE 0 .PNot supported by all npm commands..SS "\fBworkspace\fR".RS 0.IP \(bu 4Default:.IP \(bu 4Type: String (can be set multiple times).RE 0 .PEnable 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..PValid values for the \fBworkspace\fR config are either:.RS 0.IP \(bu 4Workspace names.IP \(bu 4Path to a workspace directory.IP \(bu 4Path to a parent workspace directory (will result in selecting all workspaces within that folder).RE 0 .PWhen set for the \fBnpm init\fR 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..PThis value is not exported to the environment for child processes..SS "See Also".RS 0.IP \(bu 4npm help "package spec".IP \(bu 4npm help config.IP \(bu 4npm help npmrc.IP \(bu 4npm help folders.IP \(bu 4npm help ls.IP \(bu 4npm help install.IP \(bu 4npm help link.IP \(bu 4npm help prune.IP \(bu 4npm help outdated.IP \(bu 4npm help update.RE 0