Change8
Error1 reports

Fix ZodLikeError

in Node.js

Solution

The "ZodLikeError" in Node.js often arises when an object with custom getter properties (like those found in some Error objects) is passed to a logging or serialization function that Zod or a similar library uses for validation or transformation. These getters can throw exceptions or cause infinite recursion during validation, leading to the error. To fix this, either sanitize the input object by removing or materializing the getter properties before logging/serializing (e.g., using structuredClone or a custom object mapper), or configure Zod to handle or ignore properties that may cause issues during validation.

Related Issues

Real GitHub issues where developers encountered this error:

Timeline

First reported:Dec 4, 2025
Last reported:Dec 4, 2025

Need More Help?

View the full changelog and migration guides for Node.js

View Node.js Changelog