Skip to content
ZOLO / TE721 Type · error

`effect` in an `@island` cannot be compiled to JavaScript

Compiler diagnostic TE721: `effect` in an `@island` cannot be compiled to JavaScript.

Why this fires

TE721 means an effect inside an @island contains behavior the Verniz client lowering cannot compile to JavaScript. Unlike server rendering, an island effect has no server-side half that can preserve the behavior: if it is not emitted to the client, it never runs. The compiler therefore rejects the build instead of silently dropping the side effect.

The detailed diagnostic names the unsupported expression or capability.

Fix it

  • Restrict the effect to browser-safe values and operations.
  • Move server work into an @action and trigger it through the supported client/server boundary.
  • Keep secrets, private values, filesystem access, and other server-only capabilities outside the island.
  • If the operation does not react to signals or browser state, run it in server-owned code rather than in a client effect.

Effects are appropriate for external browser state such as focus, document metadata, logging, or local storage when every value they capture satisfies the client Wire contract.

See also

  • TE719 — an island event handler cannot be compiled to JavaScript.
  • TE763 — a value does not satisfy the browser Wire contract.
  • TE764 — a secret or private value reaches client code.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

en