What is .pnpm-store?
.pnpm-store is the local store (cache) where pnpm keeps the downloaded versions of every package. It is used so identical dependencies are not downloaded and stored repeatedly for different projects.
What .pnpm-store is for
- serves as a single cache for every package installed on the machine
- enables fast repeat installs without downloading from the network again
- lets you save space, because the same package version is stored only once
How it works
- When a package is installed, pnpm downloads it into
.pnpm-store node_modulesgets hard links to the files in that store- If another project needs the same version, it is not downloaded again, it is taken from
.pnpm-store
Where it lives
Usually in the user's home directory, for example:
javascript
~/.pnpm-store(the path may vary depending on the OS and settings)
Summary
.pnpm-store is a centralized dependency cache that makes pnpm faster and more space-efficient: one version of a package is stored once and reused many times through links, instead of being duplicated in every project.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.