DF0042: Static Build Disabled By The Definition

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

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

The definition opted out of static export via capabilities.build: false, typically because it is inherently live (manages real files, spawns a process) and a build export would only produce a write-less shell. createCac already hides the build subcommand for such a definition; this covers a caller invoking createBuild() directly.

Example

// ✗ 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