NF-040: Remote component threw while rendering
A remote component threw while it rendered. Only that component is affected: the host keeps running and the page still answers 200. The usual causes are a...
Why This Error Occurred
A remote component threw while it rendered. Only that component is affected: the host keeps running and the page still answers 200. The usual causes are a browser-only API read during render, a bug, or unexpected props.
Possible Ways to Fix It
-
Fix the error in the remote and deploy a new build. Hosts pick it up within the descriptor's
revalidate. -
Keep browser-only code in effects:
export function Theme() { const [theme, setTheme] = useState('light') useEffect(() => setTheme(localStorage.getItem('theme') ?? 'light'), []) return <span>{theme}</span> } -
Make components the exposed one renders safe to render on the server, or read the descriptor with
{ dynamic: true }on that page.
Useful Links
NF-039: Remote component deferred to request time
An App Router page with cacheComponents was regenerated before this server process had loaded the remote components' build. The components render per...
NF-041: Installed react-server-dom-webpack has a known security advisory
An island remote renders islands and runs Server Actions with react-server-dom-webpack. The installed version is affected by GHSA-xqc2-xf4c-x3h3...