npm Cheat Sheet/Show node_modules root

Print the local node_modules directory.

Section: package.json editing

Show node_modules root

bash
bash
npm root
Explanation

Print the local node_modules directory.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing package.json editing
Show package root
Print the nearest package root path.
OpenIn sheetbashsame section
Get a package.json field
Read a field from package.json.
OpenIn sheetbashsame section
Set a package.json field
Write a field to package.json.
OpenIn sheetbashsame section
Delete a package.json field
Remove a field from package.json.
OpenIn sheetbashsame section
Show npm help
Open npm help.
OpenIn sheetbash1 tag match
List installed packages
Show installed dependency tree.
OpenIn sheetbash1 tag match