highcharts / highcharts/highcharts-angular

Angular Universal with highcharts-angular Getting Console Error when i run the project using dev:ssr and build:ssr ERROR TypeError: this.Highcharts[(this.constructorType || "chart")] is not a function

Open
#216 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
444
Forks
121
PR merge metrics
No merged PRs in 30d

Description

I have created simple angular universal (`@nguniversal/express-engine`) application and simple '`highcharts-angular`' in app.component.

While running this project using 'ng serve' I am not getting any error in browser and node console.

When I run the project using "dev:ssr" or "build:ssr && serve:ssr" getting below error.

```
ERROR TypeError: this.Highcharts[(this.constructorType || "chart")] is not a function
at HighchartsChartComponent.updateOrCreateChart (C:\UnivHighCharts\dist\UnivHighCharts\server\main.js:144647:74)
at HighchartsChartComponent.wrappedUpdateOrCreateChart (C:\UnivHighCharts\dist\UnivHighCharts\server\main.js:144639:18)
at HighchartsChartComponent.ngOnChanges (C:\UnivHighCharts\dist\UnivHighCharts\server\main.js:144626:18)
at HighchartsChartComponent.wrapOnChangesHook_inPreviousChangesStorage (C:\UnivHighCharts\dist\UnivHighCharts\server\main.js:73368:18)
at callHook (C:\UnivHighCharts\dist\UnivHighCharts\server\main.js:52549:14)
at callHooks (C:\UnivHighCharts\dist\UnivHighCharts\server\main.js:52509:17)
at executeInitAndCheckHooks (C:\UnivHighCharts\dist\UnivHighCharts\server\main.js:52449:9)
at refreshView (C:\UnivHighCharts\dist\UnivHighCharts\server\main.js:58951:21)
at refreshComponent (C:\UnivHighCharts\dist\UnivHighCharts\server\main.js:60383:13)
at refreshChildComponents (C:\UnivHighCharts\dist\UnivHighCharts\server\main.js:58654:9)
```
I didn't find any jsfiddle to demo the code. Below github repo my code is available.

https://github.com/karthikeyansgit/UnivHighCharts

Anyone please suggest me how to fix this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.