LinuxCommandLibrary

npm-root

prints the node_modules directory path

TLDR

Show local node_modules path

$ npm root
copy
Show global node_modules path
$ npm root -g
copy

SYNOPSIS

npm root [options]

DESCRIPTION

npm root prints the node_modules directory path. Shows where packages are installed.
The command displays module location. Useful for scripts and debugging.

PARAMETERS

-g

Global node_modules.
--help
Display help information.

CAVEATS

Local shows project node_modules. Global shows system path.

HISTORY

npm root helps locate node_modules directories for package management.

SEE ALSO

npm(1), npm-prefix(1), npm-bin(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community