# X_UI_RUNTIME_MISSING

## Means

a host capability `@ultimat3/ui` needs is absent

## Typical cause

four conditions, one code, and the `cause` names which: no Solid runtime registered while a DOM render is under way (`solid()`, `<UiProvider>`); `document`/`window` absent when `browserThemeEnv()` is asked for theme control; `Bun.CryptoHasher` absent when hashing a brand stylesheet for CSP; the icon generator's own environment — no network to `lucide-static`, or no `biome` binary. Neither `IntersectionObserver` nor `localStorage` is one of them: `InfiniteScroll` returns without observing when the first is absent, and a theme read is wrapped in `safeStorage` for the private-mode Safari that throws on the second

## Fix

for the runtime, paste `import { createContext, createEffect, createMemo, createRoot, createSignal, onCleanup, useContext } from 'solid-js';` at the top of the `*.island.tsx` and `setSolidRuntime({ createContext, useContext, createSignal, createMemo, createEffect, onCleanup, createRoot });` as the first line of its `mount()`, above `render()` — `x g resource <name>` writes exactly those two lines, and a server render needs neither. Seven named imports, never `import * as solidRuntime`: the namespace registers too, and keeps every export of solid-js in the island chunk (14.8 kB minified, measured). Off the DOM, pass an explicit `ThemeEnv`: `initTheme(myServerThemeEnv)`. For a CSP hash, call `brandStyleCspSource()` during build or SSR, never in browser code. For icons: `bun install`, then `bun run --filter @ultimat3/ui icons`

[UI](/error-codes#ui)
