Install and manage JavaScript project dependencies with guaranteed version consistency across your team.
Speed up dependency installation and CI/CD pipelines using Yarn's local caching system.
Lock exact package versions to prevent 'works on my machine' bugs when sharing code with teammates.
Yarn is a JavaScript package manager, a tool that installs, manages, and tracks the libraries and dependencies that a JavaScript or Node.js project needs. This repository contains the legacy Yarn 1.x codebase, which is now frozen for new features but still widely used. Active development continues under the newer Yarn Berry (Yarn 2+) in a separate repository. The problem package managers solve is that modern JavaScript projects rely on hundreds of third-party code packages. Managing them manually, downloading the right versions, keeping them consistent across team members' machines and CI servers, ensuring nothing gets silently corrupted, is impractical at scale. Yarn was created by Facebook (now Meta) in 2016 as a faster, more reliable alternative to npm, which was the dominant package manager at the time. Here is how it works: you run yarn install in a project directory, and Yarn reads a package.json file listing the project's dependencies. It resolves the correct versions, downloads them from the npm registry (the same public package directory npm uses), and stores them in a node_modules folder. Crucially, it writes a yarn.lock file that records the exact version of every dependency installed, including indirect dependencies. This lockfile ensures that anyone else on the team, or a CI/CD pipeline, gets the exact same package versions, preventing the "works on my machine" class of bugs. Yarn also caches downloaded packages locally so reinstalls are fast even offline. You would use Yarn when starting or maintaining a JavaScript or TypeScript project and want deterministic, fast dependency management. It integrates with the same npm registry ecosystem, so it works with all existing JavaScript packages. The stack is JavaScript, running on Node.js, available via npm or as a standalone installer.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.