question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compilation Errors

See original GitHub issue

Steps done before getting the error:

npm i angular-highcharts highcharts

npm i --save-dev @types/highcharts

Imported the module to app.module, included in module imports

Added to app.component.ts

fakeChart = new Chart({
    chart: {
      type: 'line',
      width: 500,
      height: 350
    },
    title: {
      text: 'Linechart'
    },
    credits: {
      enabled: false
    },
    series: [
      {
        type: 'line',
        name: 'Line 1',
        data: [1, 2, 3]
      }
    ]
  });

package.json

...
"angular-highcharts": "^7.0.2"
"highcharts": "^7.0.0"
...
"@types/highcharts": "^5.0.36"

Error

 ERROR in node_modules/angular-highcharts/lib/chart.d.ts(15,68): error TS2694: Namespace '"path/to/project/node_modules/highcharts/highcharts"' has no exported member 'DataPoint'.
node_modules/angular-highcharts/lib/chart.d.ts(19,33): error TS2694: Namespace '"path/to/project/node_modules/highcharts/highcharts"' has no exported member 'ChartObject'.
node_modules/angular-highcharts/lib/chart.d.ts(20,21): error TS2694: Namespace '"path/to/project/node_modules/highcharts/highcharts"' has no exported member 'ChartObject'.
node_modules/angular-highcharts/lib/chart.d.ts(36,100): error TS2694: Namespace '"path/to/project/node_modules/highcharts/highcharts"' has no exported member 'Animation'.
node_modules/angular-highcharts/lib/stockchart.d.ts(18,22): error TS2503: Cannot find namespace 'Highstock'.
node_modules/angular-highcharts/lib/stockchart.d.ts(19,10): error TS2503: Cannot find namespace 'Highstock'.
node_modules/angular-highcharts/lib/stockchart.d.ts(20,27): error TS2503: Cannot find namespace 'Highstock'.
node_modules/highcharts/highstock.d.ts(6,25): error TS2307: Cannot find module './highcharts/modules/stock'.

Please suggest how to fix.

Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:9
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

9reactions
mariusbolikcommented, Dec 23, 2018

@SayakMukhopadhyay Ah sorry. You’re right! Using highcharts@6.2.0 is the solution!

"highcharts": "^6.2.0,
"angular-highcharts": "^7.0.2",
"@angular/core": "^7.1.4",
"@types/highcharts": "^5.0.36",

Everything works well now!

2reactions
ceborcommented, Dec 23, 2018

jepp, highcharts will be supported in the next major release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

7.3. Compile Errors and Warnings
A compile error happens when the compiler reports something wrong with your program, and does not produce a machine-language translation.
Read more >
What Is a Compilation Error? (with picture) - EasyTechJunkie
A compilation error is an error in building a machine code file for a computer language. Many computer languages compile their source code ......
Read more >
Reading/Fixing Compilation Errors
Reading/Fixing Compilation Errors. When compiling a program, often many errors can occur. An attempted compile cycle with many errors.
Read more >
Difference between Compile Time Errors and Runtime Errors
Compile-Time Errors: Errors that occur when you violate the rules of writing syntax are known as Compile-Time errors. This compiler error ...
Read more >
CIS 1100 Compile Errors Walkthrough
Compiler errors happen when you write Java that's syntactically invalid or features a mismatch in acceptable types. In these cases, Java fails to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found