Back to Svelte

Server Warnings

documentation/docs/98-reference/.generated/server-warnings.md

3.59.2966 B
Original Source
<!-- This file is generated by scripts/process-messages/index.js. Do not edit! -->

unresolved_hydratable

A `hydratable` value with key `%key%` was created, but at least part of it was not used during the render.

The `hydratable` was initialized in:
%stack%

The most likely cause of this is creating a hydratable in the script block of your component and then awaiting the result inside a svelte:boundary with a pending snippet:

svelte
<script>
  import { hydratable } from 'svelte';
	import { getUser } from '$lib/get-user.js';

	const user = hydratable('user', getUser);
</script>

<svelte:boundary>
	<h1>{(await user).name}</h1>

	{#snippet pending()}
		<div>Loading...</div>
	{/snippet}
</svelte:boundary>

Consider inlining the hydratable call inside the boundary so that it's not called on the server.

Note that this can also happen when a hydratable contains multiple promises and some but not all of them have been used.