Error Encyclopedia

Hydration Missing Text

This error is similar to the error NG0500, but it means Angular's hydration process expected a text node at a specific spot in the DOM and found nothing there. Check the error NG0500 page for causes related to direct DOM manipulation.

A common cause: the server HTML changed before hydration

Hydration reuses the text nodes that server-side rendering produced. If something removes or merges those text nodes before the browser runs the application, the node Angular looks for is gone.

Common sources are an HTML minifier, a proxy or CDN that rewrites the response, a browser extension, or application code that writes text with innerHTML outside of Angular.

Debugging the error

See the error NG0500 for tips on debugging causes related to direct DOM manipulation.

Compare the HTML that the server sent with the HTML that the browser received. Use the page source rather than the element inspector, because the inspector shows the DOM after hydration already ran. If the text is present in the server response but missing in the browser, look for a tool in between that rewrites the HTML.

If you do not control the HTML for a component, you can add the ngSkipHydration attribute to its host node as a last resort. This disables hydration for that component and its children, and should be considered a bug that needs to be fixed.