.TH "NPM\-PREFIX" "1" "November 2022" "9.1.1" .SH "NAME" \fBnpm-prefix\fR .SH Synopsis .P Note: This command is unaware of workspaces\. .SH Description .P Print the local prefix to standard output\. This is the closest parent directory .br to contain a \fBpackage\.json\fP file or \fBnode_modules\fP directory, unless \fB\-g\fP is .br also specified\. .P If \fB\-g\fP is specified, this will be the value of the global prefix\. See .br \fBnpm config\fP for more detail\. .SH Example .RS 2 .nf npm prefix /usr/local/projects/foo .fi .RE .RS 2 .nf npm prefix \-g /usr/local .fi .RE .SH Configuration .SH See Also .RS 1 .IP \(bu 2 npm root .IP \(bu 2 npm bin .IP \(bu 2 npm folders .IP \(bu 2 npm config .IP \(bu 2 npmrc .RE