Yarn Install Guide · CorePack

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.

Quick answer
$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.

~/projects/example-app
yarn install
$ yarn --version
4.5.0
$ yarn install
→ Resolving packages...
→ Fetching packages...
→ Linking dependencies...
→ Building dependencies...
✓ Done in 2.34s
✓ Saved lockfile
$ yarn check
Project check passed
$

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.

Scroll to Top