This error occurs when hydration is enabled on the client, but the server response doesn't contain special serialized information about the application that hydration logic relies on.
This can happen when the provideClientHydration()
function is included in the client
part of the application configuration, but is missing in the server part of the configuration.
In applications with the default project structure (generated by the ng new
),
the provideClientHydration()
call is added either into the providers
array of
the main AppModule
(which is imported into the server module) or into a set of
providers that are included into both client and server configurations.
If you have a custom setup where client and server configuration are independent
and do not share common set of providers, make sure that the provideClientHydration()
is also included into the set of providers used to bootstrap an application on the server.
More information about hydration can be found in this guide.
Debugging the error
Verify that the provideClientHydration()
call is included into a set of providers
that is used to bootstrap an application on the server.