BASE

Yarn

Yarn

Build / code quality tool · Free

A JavaScript package manager with workspaces and dependency constraints: it helps manage reproducible installations and large monorepos.

Also known as: yarnpkg/berry; yarn; yarn-package-manager; yarnpkg/yarn; Yarn Berry

Resource illustration: Yarn

Open resource ↗

What you can use for free

Package manager, workspaces, and constraints locally under BSD-2-Clause.

Paid features and costs

Private registries, hosting, and external services are paid for separately.

Access and limitations

Package manager, workspaces, and constraints locally under BSD-2-Clause. Private registries, hosting, and external services are paid for separately.

Use cases

  • Manage monorepo packages and dependencies
  • Check reproducible installation and required workspace dependency constraints

Example workflow

A possible workflow; this is not a report of hands-on testing.

Manage monorepo packages and dependencies.

Before you start

  • A repository, package manifests, and configuration.
  • A compatible runtime and the target build command.

Steps

  1. Define workspaces and dependencies for related project packages.
  2. Check reproducible installation and required workspace dependency constraints.
  3. Add the workflow to scripts or CI with a clear report.

Check your result

  • A clean copy of the project reproduces the result.
  • Errors produce a nonzero exit code and clear diagnostics.

Choosing Yarn

Manage monorepo packages and dependencies

Choose this when

  • Manage monorepo packages and dependencies
  • Check reproducible installation and required workspace dependency constraints

Requirements

  • With PnP, each workspace must declare used packages and tools in its own dependencies. A TypeScript dependency only in the root workspace does not make tsc available to every other workspace.

Things to consider

  • Costs and limits of free use: Private registries, hosting, and external services are paid for separately.
  • Terms of use: BSD-2-Clause for current Yarn Berry code; Yarn Classic is a separate historical code line.
  • The official PnP page identifies React Native/Expo as requiring ordinary node_modules. PnP migration may reveal previously hidden undeclared dependencies; it is not a guaranteed installation-mode replacement for every project.

Frequently asked questions

What can you use for free in Yarn?

Package manager, workspaces, and constraints locally under BSD-2-Clause.

What additional costs might arise with Yarn?

Private registries, hosting, and external services are paid for separately.

What terms of use matter for Yarn?

BSD-2-Clause for current Yarn Berry code; Yarn Classic is a separate historical code line.

How do you get started with Yarn?

Define workspaces and dependencies for related project packages. Check reproducible installation and required workspace dependency constraints. Add the workflow to scripts or CI with a clear report.

Does Yarn always operate without node_modules?

No. PnP is the default in modern releases, but .yarnrc.yml can set nodeLinker: node-modules. The documentation also notes automatic PnP disabling when migrating an existing Yarn Classic project.

License

BSD-2-Clause for current Yarn Berry code; Yarn Classic is a separate historical code line.

Custom license — this product's terms apply

The license name does not imply standard MIT or GPL rights. Its own text determines permission to modify, work commercially, distribute, and use outputs. Follow the use case stated for the product above and the primary source for its terms.

Technologies and topics

  • Yarn
  • build
  • Development

Sources

Other resources