
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
global-prefix
Advanced tools
Get the npm global path prefix.
Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your :heart: and support.
Install with npm:
$ npm install --save global-prefix
This is partially based on the code used by npm internally to resolve the global prefix.
var prefix = require('global-prefix');
//=> '/usr/local' (this path will differ by system and user-defined config)
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
You might also be interested in these projects:
| Commits | Contributor |
|---|---|
| 23 | jonschlinkert |
| 15 | doowb |
| 2 | phated |
| 1 | rmbaad |
| 1 | avengerpenguin |
| 1 | jorrit |
| 1 | mathiasvr |
| 1 | tunnckoCore |
Jon Schlinkert
Copyright © 2018, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on October 11, 2018.
Similar to global-prefix, global-modules provides the location of the global npm modules directory. However, it focuses specifically on the modules directory rather than the npm prefix.
This package is similar to global-prefix but offers more detailed information, including paths to npm's directories for packages, binaries, and data. It provides a broader scope of information about global directories.
While not directly related to global paths, which-pm-runs can be used to detect which package manager is currently running a script, which can be useful in conjunction with global path information to perform package manager-specific operations.
FAQs
Get the npm global path prefix.
The npm package global-prefix receives a total of 9,759,287 weekly downloads. As such, global-prefix popularity was classified as popular.
We found that global-prefix demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.