PACKAGE · PACKAGE MANAGER

yarn

📦🐈 Fast, reliable, and secure dependency management.

WEEKLY DOWNLOADS 13.5M
STARS 41.5K
FORKS 2.7K
OPEN ISSUES 2.1K
INSTALL SIZE 5.3 MB
UNPACKED SIZE 5.3 MB
LAST UPDATED 1y ago
DOWNLOAD TRENDS

yarn downloads · last 12 months

Download trends for yarn1 download series from Nov 2025 to Oct 2026. Use left and right arrow keys to inspect monthly values.011.4M22.8M34.2M45.6MNov 2025FebMayAugOct 2026
yarn
ABOUT YARN

Yarn is a JavaScript package manager for installing and managing project dependencies. It reads dependency declarations from package.json, resolves package versions, and records the resulting dependency tree in yarn.lock so installs can be repeated consistently across developer machines and build environments.

Yarn’s stated goals are fast, reliable, and secure dependency management. Its primary audience is JavaScript developers and teams that want a command-line workflow for adding, removing, and installing project dependencies while keeping dependency changes reviewable in version control.

The central workflow uses commands such as yarn add to declare a dependency, yarn remove to remove one, and yarn install to install the project’s declared dependencies. The yarn.lock file captures resolved versions; committing it alongside package.json helps collaborators and automated builds use the same dependency resolution rather than independently selecting versions.

Yarn fits into JavaScript projects that use package.json, including application and library development, local development, and continuous integration. It can be used from project scripts and build workflows, giving teams a consistent command-line entry point for dependency installation without changing the application’s framework.

Version 1.22.22 is the package version listed here, with an unpacked size of 5.3 MB. The reported 3.5 million weekly downloads and 41.5 thousand GitHub stars indicate substantial ecosystem use, while the listed 2.1 thousand open issues are a practical reason to review current documentation and issue status before relying on a particular behavior.

Yarn is a dependency manager, not a replacement for application code, a JavaScript runtime, or a build system. Its behavior depends on project manifests, lockfile state, and the package sources available to the installation workflow, so teams should keep package.json and yarn.lock aligned and check compatibility requirements before adopting it in an existing repository.

WHEN TO USE
  • Use yarn install in a JavaScript repository with package.json and yarn.lock to install the versions recorded for the project.
  • Use yarn add when adding a dependency so the package declaration and resolved lockfile entry are updated through the Yarn workflow.
  • Use yarn remove to remove a declared package and update the project’s dependency records together.
  • Commit yarn.lock when developers and automated builds need a shared record of resolved dependency versions.
  • Run Yarn from project scripts or continuous-integration jobs when those workflows should use the same dependency installation command as local development.
  • Choose Yarn for a JavaScript project whose contributors already use its command-line dependency-management workflow and lockfile.
WHEN NOT TO USE
  • Avoid Yarn if the project or its deployment environment requires a different package-manager workflow; use the manager required by that environment and keep its manifest and lockfile consistent.
  • Avoid switching an existing repository to Yarn without a lockfile migration plan; choose one package manager for routine installs and remove conflicting lockfiles after migration.
  • Avoid Yarn when the task is only to run JavaScript code or compile assets; use the relevant runtime or build tooling, since Yarn manages dependencies rather than executing those roles itself.
  • Avoid relying on yarn.lock alone to declare direct dependencies; add required packages to package.json with yarn add so the project manifest records them.
  • Avoid adopting a specific Yarn behavior without checking compatibility with the project’s required version; consult the documentation for the listed 1.22.22 release before changing install workflows.
  • Avoid introducing Yarn into a team that cannot support its installation and lockfile conventions; retain the repository’s established package-management process or coordinate a shared migration first.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 3
yarn vs pnpm ★ 37.2K · 351.7M/wk yarn vs npm ★ 10.3K · 24.5M/wk yarn vs bun ★ 97.0K · 6.3M/wk