npm root

Category: Node.js & npm/yarn

npm root

Print the local node_modules directory

Prints the absolute path of the project's node_modules folder, handy for scripts that must locate installed binaries or modules. Runs from anywhere inside the project tree. The -g flag reports the global node_modules instead.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.