Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
npm-root.157 linesDownload Raw Back to man1
1.TH "NPM-ROOT" "1" "April 2026" "NPM@11.13.0" ""
2.SH "NAME"
3\fBnpm-root\fR - Display npm root
4.SS "Synopsis"
5.P
6.RS 2
7.nf
8npm root
9.fi
10.RE
11.P
12Note: This command is unaware of workspaces.
13.SS "Description"
14.P
15Print the effective \fBnode_modules\fR folder to standard out.
16.P
17Useful for using npm in shell scripts that do things with the \fBnode_modules\fR folder. For example:
18.P
19.RS 2
20.nf
21#!/bin/bash
22global_node_modules="$(npm root --global)"
23echo "Global packages installed in: ${global_node_modules}"
24.fi
25.RE
26.SS "Configuration"
27.SS "\fBglobal\fR"
28.RS 0
29.IP \(bu 4
30Default: false
31.IP \(bu 4
32Type: Boolean
33.RE 0
34
35.P
36Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior.
37.RS 0
38.IP \(bu 4
39packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory.
40.IP \(bu 4
41bin files are linked to \fB{prefix}/bin\fR
42.IP \(bu 4
43man pages are linked to \fB{prefix}/share/man\fR
44.RE 0
45
46.SS "See Also"
47.RS 0
48.IP \(bu 4
49npm help prefix
50.IP \(bu 4
51npm help folders
52.IP \(bu 4
53npm help config
54.IP \(bu 4
55npm help npmrc
56.RE 0
57 
codekingpro/portable-devtools · Team Ai