2023-04-07 00:54:09 +00:00
|
|
|
@name No hydration info in server response
|
|
|
|
|
@category runtime
|
|
|
|
|
@shortDescription No hydration info is present in server response.
|
|
|
|
|
|
|
|
|
|
@description
|
|
|
|
|
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
|
2023-05-16 13:29:44 +00:00
|
|
|
part of the application configuration, but is missing in the server part of the configuration.
|
2023-04-07 00:54:09 +00:00
|
|
|
|
|
|
|
|
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](guide/hydration).
|
|
|
|
|
|
|
|
|
|
@debugging
|
|
|
|
|
Verify that the `provideClientHydration()` call is included into a set of providers
|
|
|
|
|
that is used to bootstrap an application on the server.
|