---
outline: deep
---

# DF0042: Static Build Disabled By The Definition

## Message

> "`{id}`" declares `capabilities.build: false` — its static export is not meaningful (writes are excluded and any live-served data won't be there).

## Cause

`createBuild` runs unconditionally when called directly, but a definition can opt out of static export via `capabilities.build: false` — typically because the devframe is inherently live (it manages real files on disk, spawns a process, etc.) and a `mode: 'build'` export would only ever produce a broken, write-less shell of the tool. `createCac` already skips registering the `build` subcommand for such a definition; this diagnostic covers the remaining path — a caller invoking `createBuild()` directly, bypassing the CLI.

## Example

```ts
// ✗ Bad — builds a devframe that opted out of static export
await createBuild(assetsDevframe) // throws DF0042

// ✓ Good — the degraded export is still useful to you
await createBuild(assetsDevframe, { force: true })
```

## Fix

- Pass `{ force: true }` to `createBuild()` if the degraded export is still useful to you.
- Otherwise, drop `capabilities.build: false` on the definition if a static export should be supported after all.

## Source

- [`packages/devframe/src/adapters/build.ts`](https://github.com/devframes/devframe/blob/main/packages/devframe/src/adapters/build.ts) — `createBuild()` throws this when `capabilities.build` is `false` and `force` isn't set.
