yarn install Dependencies, Flags & Errors
The yarn install command prepares
the dependencies needed by a JavaScript or
Node.js application. Yarn reads the project's
dependency settings, uses the lockfile to resolve
package versions, fetches necessary packages,
and makes them accessible through the configured
installation method.
$yarn install
$yarn install --immutable
$yarn install --frozen-lockfile
The immutable and frozen-lockfile options provide comparable lockfile protection, but their usage differs between modern Yarn and Yarn Classic.
After cloning a repository or pulling changes that introduce new dependencies, yarn install is commonly among the first commands to run. In this guide, you'll learn about dependency installation, configuration files, available flags, CI workflows, and ways to diagnose and resolve common installation problems.