npm package
Homepkg-dir
pkg-dir is a utility for locating the root directory of a Node. js project or npm package. It is useful when you need to determine the base path for configuration or resource loading in your application.
- lurq health score
- 44/100
- Confidence
- unproven
- Weekly downloads
- 63,182,186
- Latest version
- 9.0.0
- Last release
- Feb 1, 2026
- License
- MIT
Should you depend on pkg-dir?
lurq's verdict: medium
- Deprecated on npm
- No known advisories
- the publisher has marked this package deprecated
Check this from your coding agent
This page is a daily snapshot. lurq's verify tool checks pkg-dir at the exact version your agent is about to install, and compat checks it against the rest of your stack. One command connects Claude Code, Cursor, VS Code and other agents:
npx lurqrun
Free to start. Quickstart
Upgrading pkg-dir
What each major version removed, renamed or re-signatured, from lurq's extraction of the published packages.
- 8.0.0 → 9.0.0diff ready
- 7.0.0 → 8.0.0diff ready
- 6.0.1 → 7.0.0diff ready
Scored from public signals (npm registry, GitHub, deps.dev and advisory databases). Data as of Sep 16, 2026; this page refreshes every 168 hours. Source repository.