On this page

UnsupportedMarkupEffectPositionError

Trace a scanned markup expression for which SER has no lowering rule.

What this error means and what can trigger it

UnsupportedMarkupEffectPositionError means SER found yield* inside a braced markup expression, but the Svelte AST placed it somewhere SER does not yet know how to lower safely.

Supported positions include expression tags; if, each, await, and key block expressions; render and HTML tags; declaration tags; and event attributes that follow Svelte's current or legacy conventions. Ordinary component and element attributes are not implicit effect boundaries, however. A prop such as <Widget value={yield* Load()} /> therefore triggers this error, as does an unsupported tag position such as {@debug yield* Inspect()}.

Exactly where it triggers

const classified = classify_candidates(ast, work.candidates);
const matched = new Set(classified.map(({ candidate }) => candidate.placeholder));
const unmatched = work.candidates.find((candidate) => !matched.has(candidate.placeholder));

if (unmatched) {
	throw new UnsupportedMarkupEffectPositionError(filename, unmatched.expr_text);
}

The scanner first replaces every relevant brace expression with a placeholder so Svelte can parse the sanitized markup. The classifier then walks only AST positions SER knows how to emit. The first placeholder that was scanned but never classified becomes unmatched and causes this synchronous transform exception.

For reference, the class itself is declared at modules/svelte-effect-runtime/src/errors.ts L322 @ C14.

Why this is the case

Each supported position has a concrete generated representation. Interpolation can wait on a dispatcher promise; an event can submit a dispatcher run; a block can resolve the expression that controls its branch or iteration. An ordinary prop or unsupported directive follows a different Svelte evaluation contract.

Resolving such a value early could change SSR output, update timing, prop identity, or directive ownership. SER requires an explicit classifier and emitter pair before it will transform a markup position.