---
title: reed build
description: Compile the project into a deployable static site.
---

```sh
reed build [--dir <path>] [--content <path>] [--out <path>] [--strict-tokens] [--strict-components]
```

Compiles `docs.json` plus your content into a static site. See
[Build output](/docs/ship/output) for everything it writes.

**Prerequisites:** a prior successful `reed prefetch` on this machine, and a
Corepack-resolvable package manager. Given those, `build` needs no network.

## Options

<ParamField name="--dir" type="path">
  Project root. Defaults to the current directory.
</ParamField>

<ParamField name="--content" type="path">
  Content directory. Defaults to `<dir>/content`.
</ParamField>

<ParamField name="--out" type="path">
  Output directory.
</ParamField>

<ParamField name="--strict-tokens" type="boolean" default="false">
  Escalate every warning except `DS-D*` to an error.
</ParamField>

<ParamField name="--strict-components" type="boolean" default="false">
  Escalate `DS-D*` design-system warnings to errors.
</ParamField>

## Output safety

`--out` is written through a staged atomic replacement: the directory is never a mixture
of old and new files, even if the build fails partway through.

An `--out` that overlaps a build input is refused. Pointing the output at your content
directory would otherwise let a build consume what it just wrote.

## When Corepack is missing

Node 16.9 and later ship Corepack, but Node 25 and newer no longer bundle it by default.
On such a machine `build` fails immediately and says so:

```
build failed: [reed] Corepack is required but not available on this machine — install/enable Corepack, then run `reed prefetch`.
```

This is a fast, specific failure rather than a silent fallback to the network.

## Time limits

<ParamField name="REED_BUILD_TIMEOUT_MS" type="env" default="1800000">
  Ceiling for the site build, in milliseconds — 30 minutes by default.
</ParamField>

<ParamField name="REED_INSTALL_TIMEOUT_MS" type="env" default="900000">
  Ceiling for dependency installation, in milliseconds — 15 minutes by default.
</ParamField>

Set either to `0` to remove its ceiling. These exist to turn a hang into an error, not to
police slow builds. A negative or non-numeric value is rejected rather than ignored, so a
typo cannot silently restore an unbounded build.
