highcharts-angular icon indicating copy to clipboard operation
highcharts-angular copied to clipboard

Library production build error on latest version 3.1.0

Open joeveiga opened this issue 3 years ago • 6 comments

Describe the bug

It works fine up to v3.0.0. Latest update caused an error on our build pipeline with what it seems to be breaking changes introduced on v3.1.0.

An unhandled exception occurred: node_modules/highcharts-angular/lib/highcharts-chart.component.d.ts:24:18 - 
error TS2314: Generic type 'ɵɵComponentDeclaration' requires 7 type argument(s).

24     static ɵcmp: i0.ɵɵComponentDeclaration<
  HighchartsChartComponent,
  "highcharts-chart",
  never, { 
    "Highcharts": "Highcharts";
    "constructorType": "constructorType";
    "callbackFunction": "callbackFunction";
    "oneToOne": "oneToOne";
    "runOutsideAngular": "runOutsideAngular";
    "options": "options";
    "update": "update"; 
  }, { 
    "updateChange": "updateChange";
    "chartInstance": "chartInstance"; 
  }, 
  never, 
  never, 
  false, 
  never
>;

Expected behavior

Minor version changes to be compatible.

Setup used

  • NodeJS version: 14

  • Angular version: 13.3.4

  • TypeScript version: 4.6.4

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "esModuleInterop": true,
    "resolveJsonModule": true,
    "allowSyntheticDefaultImports": true,
    "module": "es2020",
    "target": "es2017",
    "typeRoots": ["node_modules/@types"],
    "lib": ["es2017", "dom", "es2019", "ESNext.BigInt"],
    }
  },
  "angularCompilerOptions": {
    "strictTemplates": false,
    "compilationMode": "partial"
  }
}

joeveiga avatar Feb 02 '23 17:02 joeveiga

Angular dependency was changed from 13 to 14. I had to use ~3.0.0 instead of ^3.0.0 to avoid 3.1.x

jthorsen avatar Feb 03 '23 04:02 jthorsen

@jthorsen that is correct my mistake! For Angular version 13 please use highcharts-angular in version 3.0.0

karolkolodziej avatar Feb 03 '23 07:02 karolkolodziej

The build also fails on angular 14.2.12

izbushka avatar Feb 03 '23 08:02 izbushka

You are right, I see a similar issue with Angular 14... in 15 it looks alright.

I will wait for the Highcharts v11 release (which should be in a couple of weeks) and after that, I will release a new major version of this wrapper.

I apologize for the inconvenience- right now it looks like using version 3.0.0 is a valid solution for older Angular versions.

karolkolodziej avatar Feb 03 '23 08:02 karolkolodziej

@karolkolodziej are there still plans to release new major version of highcharts-angular that works with Angular 14+ (including v16)?

minijus avatar May 11 '23 05:05 minijus

Hi @minijus! As far as I see, you can correctly use the highcharts-angular with the Angular 16- demo.

But nevertheless, in the nearest future, we will release a new version 😄

karolkolodziej avatar May 15 '23 06:05 karolkolodziej