Change8
Error1 reports

Fix DataCloneError

in Deno

Solution

DataCloneError in Deno typically arises when attempting to pass non-cloneable objects (like DOM nodes, functions, or ReadableStreams) across the Deno isolate boundary, such as when using `postMessage` or Workers. To resolve this, ensure you only pass cloneable data structures (plain objects, arrays, primitive values) or serialize/deserialize the non-cloneable data into a transferable format (e.g., using `structuredClone` for complex objects or manually converting Streams to ArrayBuffers). If using `postMessage`, leverage the `transfer` option to efficiently move ownership of ArrayBuffer data instead of cloning it.

Related Issues

Real GitHub issues where developers encountered this error:

Timeline

First reported:Dec 24, 2025
Last reported:Dec 24, 2025

Need More Help?

View the full changelog and migration guides for Deno

View Deno Changelog