l-lin / angular-datatables

DataTables with Angular
https://l-lin.github.io/angular-datatables/
MIT License
1.57k stars 486 forks source link

angular-datatables Installation Error: Subsequent property declarations must have the same type. Property 'dataTable' must be of type 'StaticFunctions', but here has type 'jQueryDataTable'. #1599

Closed Suguru-Tokuda closed 2 years ago

Suguru-Tokuda commented 2 years ago

I am using Angular 12 and I tried to install angular-datatables by running "ng add angular-tables". All the dependencies were added successfully as below: ℹ️ Skipped adding "jquery" into package.json ✅️ Added "datatables.net" into "dependencies" ℹ️ Skipped adding "@types/jquery" into package.json ✅️ Added "@types/datatables.net" into "devDependencies" ✅️ Added "datatables.net-dt" into "dependencies" 🔍 Installing packages... ℹ️ Skipped adding "jQuery Core" into angular.json ✅️ Added "DataTables.net Core JS" into angular.json

The issue is when I run "ng serve" and there is a compilation error saying:

Error: node_modules/datatables.net/types/types.d.ts:33:9 - error TS2717: Subsequent property declarations must have the same type. Property 'dataTable' must be of type 'StaticFunctions', but here has type 'jQueryDataTable'.

33 dataTable: jQueryDataTable;


  node_modules/@types/datatables.net/index.d.ts:17:5
    17     dataTable: DataTables.StaticFunctions;
'dataTable' was also declared here.

Does anyone have the same issue?