0

I pulled an Angular 11 project and after installing the node modules, getting error during npx ng build:

Error: node_modules/angular-datatables/src/angular-datatables.directive.d.ts:31:25 - error TS2503: Cannot find namespace 'DataTables'.

31     dtInstance: Promise<DataTables.Api>;
                           ~~~~~~~~~~


Error: node_modules/angular-datatables/src/models/settings.d.ts:3:38 - error TS2503: Cannot find namespace 'DataTables'.      

3 export interface ADTSettings extends DataTables.Settings {
                                       ~~~~~~~~~~


Error: node_modules/angular-datatables/src/models/settings.d.ts:6:37 - error TS2503: Cannot find namespace 'DataTables'.      

6 export interface ADTColumns extends DataTables.ColumnSettings 

this is part of my package.json


  "dependencies": {
    .....
    .....
    "angular-datatables": "^11.1.1",
    "bootstrap": "^4.5.3",
    "core-js": "^3.6.5",
    "datatables.net": "^1.10.22",
    "datatables.net-dt": "^1.10.22",
    "datatables.net-responsive": "^2.2.6",
    "datatables.net-responsive-dt": "^2.2.6",
    "jquery": "^3.5.1"
  },
  "devDependencies": {
    .....
    "@types/datatables.net": "^1.10.19",
    .....
  }

The following versions can be used to reproduce the issue: (Angular CLI: 11.2.14, Node: 14.21.3, OS: win32 x64, Angular: 11.2.14)

I have tried modifying everything possible , also went through different suggestions on github: [https://github.com/l-lin/angular-datatables/issues/1248%5C%5C] but still facing the issue again and again.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.