l-lin / angular-datatables

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

Unable to build app #1603

Closed Vinche59 closed 3 years ago

Vinche59 commented 3 years ago

:beetle: bug report

Unable to build app, ng build or ng serve fails with those errors:

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.

:microscope: Minimal Reproduction

StackBlitz/GitHub Link:

Step-by-step Instructions:

ng build or ng serve

:8ball: Expected behavior

Build success

:camera: Screenshots

:globe_with_meridians: Your Environment

:memo: Additional context

Vinche59 commented 3 years ago

Okay, nevermind. It was a mistake in my own code ... Sorry.

coolalex12 commented 3 years ago

@Vinche59 I have the same problem. how did you solve it?

Vinche59 commented 3 years ago

@Vinche59 I have the same problem. how did you solve it?

@coolalex12 If I remember correctly, I think I had, for some unknown reasons, direct importation of import 'datatables.net'; inside one of two of my .ts files. Once removed, the project compiled again.