xieziyu/ngx-echarts

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

krabouilleur opened this issue · 5 comments

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",

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

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.

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

@krabouilleur thank you and Merry Christmas :)

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!!