Yarn Flags & Options
Node.js package manager (Classic and Berry).All Yarn pages
- yarn --cwd DIR: run Yarn in another directory without cdyarn --cwd client build runs Yarn as if started inside client/, without cd. Typical root scripts, yarn workspace as the Yarn 2+ alternative, npm --prefix.
- yarn install --frozen-lockfile (Yarn 1) and --immutable (Yarn 2+)yarn install --frozen-lockfile fails instead of updating yarn.lock when it is out of date; Yarn 2+ uses --immutable. Real errors and the lockfile fix.
- yarn install --ignore-engines: skip the engines check (Yarn 1)yarn install --ignore-engines skips the Yarn 1 engines check that fails with The engine node is incompatible with this module. Config forms, better fixes.
- yarn install --production: skip devDependencies (Yarn 1 and Yarn 4)yarn install --production skips devDependencies in Yarn 1, also under NODE_ENV=production. Yarn 4 uses yarn workspaces focus --production. Docker and pitfalls.