How to Install Yarn on Windows
Install Yarn on Windows if a project uses yarn.lock or you want Yarn commands available alongside Node.js and npm.
Supported Versions
Official Source
GitHub / yarnpkg.com (official)
Environment Setup
1 PATH entry
Verify Step
yarn --version
DevTools Installer is not affiliated with, endorsed by, or sponsored by the publisher of Yarn. All product names and logos are trademarks of their respective owners. Downloads are sourced directly from the official publisher.
Install With DevTools Installer
Use this path if you want DevTools Installer to download the official package and handle the Windows setup for you.
- 1Open DevTools Installer.
- 2Install Node.js first, then select "Yarn" in Package Managers.
- 3Click "Install Selected".
- 4Let the installer download the official MSI, run it silently, and add to PATH.
- 5Open a new terminal window after the install finishes.
- 6Run to verify Yarn is available.
Download Source
DevTools Installer downloads from the official publisher:
https://github.com/yarnpkg/yarn/releases/download/v1.22.22/yarn-1.22.22.msi
PATH & Environment Variables
DevTools Installer sets the following automatically:
PATH entries
C:\Program Files (x86)\Yarn\bin
Verification
DevTools Installer verifies the install by running:
yarn --version
Expected output: 1.22.22
Manual Installation Steps
Use these steps if you want to run the installer yourself and apply the Windows PATH or environment changes manually.
- 1Install Node.js first. Yarn depends on Node.js.
- 2Download the official MSI from https://github.com/yarnpkg/yarn/releases/download/v1.22.22/yarn-1.22.22.msi
- 3Run the installer.
- 4The installer adds to PATH automatically.
- 5Open a new terminal and run .
- 6If your project already has a yarn.lock file, use Yarn for that project instead of npm.
Need to upgrade, downgrade, or remove Yarn?
DevTools Installer can also upgrade Yarn to a newer version, roll back to an older one, or cleanly uninstall it — including PATH entries and environment variables. No manual cleanup required.
What Is Yarn Used For?
- Managing dependencies in Node.js projects — Yarn creates a deterministic lockfile for reproducible builds.
- Faster installs than npm in many scenarios due to parallel downloading and caching.
- Monorepo management with Yarn Workspaces for sharing packages across multiple projects.
- Offline installations — Yarn caches every package it downloads, enabling installs without network access.
- Projects that specify Yarn in their contributing guidelines or CI/CD configuration.
Common Issues And Fixes
Check the problem and the exact fix before you reinstall anything. Some guides also include the reason the issue happens.
Problem
"yarn" is not recognized after installation
Exact fix
Ensure C:\Program Files (x86)\Yarn\bin is in your system PATH. Reopen your terminal after installation.
Problem
Yarn conflicts with npm when both are used in the same project
Exact fix
Choose one package manager per project. If the project has a yarn.lock, use Yarn. If it has a package-lock.json, use npm. Delete the other lockfile to avoid inconsistencies.
Problem
Yarn global packages are not found
Exact fix
Run "yarn global bin" to find the global bin directory and ensure it is in your PATH. On Windows this is typically %LOCALAPPDATA%\Yarn\bin.
Problem
Installation fails behind a corporate proxy
Exact fix
Configure Yarn's proxy settings: "yarn config set proxy http://proxy:port" and "yarn config set https-proxy http://proxy:port".
Tips for Yarn
- ✓Yarn requires Node.js. Install Node.js first via DevTools Installer before installing Yarn.
- ✓Yarn 1.x (Classic) is the stable version installed here. Yarn 2+ (Berry) uses a different architecture and is enabled per-project via "yarn set version berry".
- ✓Use "yarn why <package>" to understand why a specific dependency is in your project.
- ✓Yarn's offline mirror feature is useful for CI environments: run "yarn install --offline" after caching packages locally.
Related Guides
Node.js
Install Node.js on Windows so you can run node, npm, Vite, React, Next.js, and other JavaScript tooling from any terminal.
Git
Install Git on Windows so you can clone repositories, commit changes, use Git Bash, and run git from any terminal.
Visual Studio Code
Install VS Code on Windows if you want a fast editor with extensions, terminal integration, and the code command available on PATH.