xieziyu / ngx-echarts

An angular (ver >= 2.x) directive for ECharts (ver >= 3.x)
https://xieziyu.github.io/ngx-echarts/
MIT License
1.11k stars 197 forks source link

Generic type 'ɵɵDirectiveDeclaration' requires between 6 and 8 type arguments. #383

Closed krabouilleur closed 1 year ago

krabouilleur commented 1 year ago

Hi, My angular version is 14

I'm installing ngx-echarts, but when I "yarn start" there is this error in console:

Error: node_modules/ngx-echarts/lib/ngx-echarts.directive.d.ts:90:18 - error TS2707: Generic type 'ɵɵDirectiveDeclaration' requires between 6 and 8 type arguments.

I installed echarts by this way :

npm install echarts -S
npm install ngx-echarts -S

in the package.json: "echarts": "^5.4.1", "ngx-echarts": "^15.0.1",

Menschomat commented 1 year ago

What was your solution @krabouilleur ? I have the same problem.

Menschomat commented 1 year ago

Ok... for me an upgrade to Angular 15 did the trick. In my case this was not a problem, because it's a nearly fresh hobby-project. But for a business this might be a deal-breaker.

krabouilleur commented 1 year ago

Yes the problem was: I had a project for Angular 14.

solution: migrate to Angular 15 or run the command: npm i ngx-echarts@versionForAngularX

Menschomat commented 1 year ago

@krabouilleur thank you and Merry Christmas :)

JonathanJPereira commented 1 year ago

I had the same problem here, I'm using angular 14.0.0 but I can't change the version. So I'm using ngx-echarts version 14.0.0 instead of the 15.0.1 that was installed.

Merry Christmas and Happy New Year to everyone!!