LinuxCommandLibrary

npm-prefix

prints the local or global prefix path

TLDR

Show local prefix

$ npm prefix
copy
Show global prefix
$ npm prefix -g
copy

SYNOPSIS

npm prefix [options]

DESCRIPTION

npm prefix prints the local or global prefix path. Shows where packages are installed.
The command displays installation directory. Useful for scripting.

PARAMETERS

-g

Global prefix.
--help
Display help information.

CAVEATS

Local shows closest package.json dir. Global shows npm global path.

HISTORY

npm prefix helps locate package installation directories for scripts and debugging.

SEE ALSO

npm(1), npm-root(1), npm-bin(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community