Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
npm-prefix.164 linesDownload Raw Back to man1
1.TH "NPM-PREFIX" "1" "April 2026" "NPM@11.13.0" ""
2.SH "NAME"
3\fBnpm-prefix\fR - Display prefix
4.SS "Synopsis"
5.P
6.RS 2
7.nf
8npm prefix
9.fi
10.RE
11.P
12Note: This command is unaware of workspaces.
13.SS "Description"
14.P
15Print the local prefix to standard output. This is the closest parent directory to contain a \fBpackage.json\fR file or \fBnode_modules\fR directory, unless \fB-g\fR is also specified.
16.P
17If \fB-g\fR is specified, this will be the value of the global prefix. See npm help config for more detail.
18.SS "Example"
19.P
20.RS 2
21.nf
22npm prefix
23/usr/local/projects/foo
24.fi
25.RE
26.P
27.RS 2
28.nf
29npm prefix -g
30/usr/local
31.fi
32.RE
33.SS "Configuration"
34.SS "\fBglobal\fR"
35.RS 0
36.IP \(bu 4
37Default: false
38.IP \(bu 4
39Type: Boolean
40.RE 0
41
42.P
43Operates 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.
44.RS 0
45.IP \(bu 4
46packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory.
47.IP \(bu 4
48bin files are linked to \fB{prefix}/bin\fR
49.IP \(bu 4
50man pages are linked to \fB{prefix}/share/man\fR
51.RE 0
52
53.SS "See Also"
54.RS 0
55.IP \(bu 4
56npm help root
57.IP \(bu 4
58npm help folders
59.IP \(bu 4
60npm help config
61.IP \(bu 4
62npm help npmrc
63.RE 0
64 
codekingpro/portable-devtools · Team Ai