.TH "NPM\-ROOT" "1" "November 2023" "9.2.0" .SH "NAME" \fBnpm-root\fR .SH Synopsis .SH Description .P Print the effective \fBnode_modules\fP folder to standard out\. .P Useful for using npm in shell scripts that do things with the .br \fBnode_modules\fP folder\. For example: .RS 2 .nf #!/bin/bash global_node_modules="$(npm root \-\-global)" echo "Global packages installed in: ${global_node_modules}" .fi .RE .SH Configuration .SH See Also .RS 1 .IP \(bu 2 npm prefix .IP \(bu 2 npm bin .IP \(bu 2 npm folders .IP \(bu 2 npm config .IP \(bu 2 npmrc .RE