Shows the nearest directory containing a package.json or node_modules, which is where npm considers the current project to live. Useful in scripts that need the project root. The -g flag reports the global installation prefix instead.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.