This issue applies to any third-party module that is not optimized for server-side rendering.
The workaround is to exclude the module from app.module.server.ts
and instead import a dummy module that drowns out all the units from the original module, or at least those currently used in the application:
@Component({ selector: 'ngx-charts-advanced-pie-chart' })
class DummyAdvancedPieChartComponent {
@Input('view') view;
}
If there are vendors that cannot be imported from the source modules, they must also be drowned.
An alternative to dummy components and directives is to use a custom schema . Use is NO_ERRORS_SCHEMA
undesirable as it also suppresses useful errors.
estus source
share