
Fast, efficient package manager
免费

pnpm is a high-performance alternative to npm and yarn, designed to optimize disk space usage and installation speed for JavaScript and TypeScript projects. Unlike traditional package managers that duplicate dependencies across projects, pnpm uses a content-addressable store to save files in a single location on your disk, linking them into your project's node_modules folder. This architecture significantly reduces storage overhead and speeds up installation times. Beyond performance, pnpm offers robust support for monorepos through its built-in workspace features, allowing developers to manage multiple packages within a single repository seamlessly. It also prioritizes security by mitigating common supply chain attack vectors, such as restricting post-install scripts and providing tools to verify package release ages.
Saves all files from all packages in a single place on the disk, preventing duplication.
Built-in workspace capabilities allow for easy management of multiple packages in one repository.
Optimized installation process that performs operations in parallel for maximum speed.
Prevents 'phantom dependencies' by ensuring packages can only access what is explicitly declared.
Includes features like minimum release age and script execution restrictions to block malicious code.
Uses hard links to share files between projects, drastically reducing the size of node_modules.
Install pnpm globally using your current package manager: 'npm install -g pnpm'.,Navigate to your project directory and run 'pnpm install' to generate a pnpm-lock.yaml file.,Add new dependencies using 'pnpm add
Ideal for large-scale projects using tools like Nx or Turborepo that require complex dependency orchestration.
Reduces build times in continuous integration pipelines by leveraging cached dependencies and faster install speeds.
Perfect for developers working on multiple projects who want to avoid redundant storage usage.
Used by teams that need to mitigate risks from malicious packages via strict dependency policies.
Individuals building web applications who need faster local development and build cycles.
Professionals managing CI/CD pipelines looking to optimize build performance and security.
Teams managing large monorepos that require efficient dependency sharing across multiple services.
pnpm is a completely free and open-source project licensed under the MIT License. It is maintained by the community and supported by various sponsors.