Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

angular-datatables has no exported member #1691

Closed
@wjun20314

Description

@wjun20314
  • NodeJS version: 16.13.0
  • Angular version: 14.2.12
  • Angular CLI version: 14.2.10
  • jQuery version: 3.6.0
  • DataTables version: ^1.11.3
  • angular-datatables version: ^14.0.0

I started my new project, I tried to compile but it failed to compile.

Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:256:25 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵFactoryDeclaration'.

256     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<ApplicationInitStatus, [{ optional: true; }]>;
                            ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:257:26 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵInjectableDeclaration'.

257     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<ApplicationInitStatus>;
                             ~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:272:25 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵFactoryDeclaration'.

272     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<ApplicationModule, never>;
                            ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:273:25 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵNgModuleDeclaration'.

273     static ɵmod: ɵngcc0.ɵɵNgModuleDeclaration<ApplicationModule, never, never, never>;
                            ~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:274:25 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵInjectorDeclaration'.

274     static ɵinj: ɵngcc0.ɵɵInjectorDeclaration<ApplicationModule>;
                            ~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:440:25 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵFactoryDeclaration'.

440     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<ApplicationRef, never>;
                            ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:441:26 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵInjectableDeclaration'.

441     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<ApplicationRef>;
                             ~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:786:25 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵFactoryDeclaration'.

786     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<Compiler, never>;
                            ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:787:26 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵInjectableDeclaration'.

787     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<Compiler>;
                             ~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:5019:25 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵFactoryDeclaration'.

5019     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<PlatformRef, never>;
                             ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:5020:26 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵInjectableDeclaration'.

5020     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<PlatformRef>;
                              ~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:6405:25 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵFactoryDeclaration'.

6405     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<SystemJsNgModuleLoader, [null, { optional: true; }]>;
                             ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:6406:26 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵInjectableDeclaration'.

6406     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<SystemJsNgModuleLoader>;
                              ~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:6602:25 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵFactoryDeclaration'.

6602     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<Testability, never>;
                             ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:6603:26 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵInjectableDeclaration'.

6603     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<Testability>;
                              ~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:6647:25 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵFactoryDeclaration'.

6647     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<TestabilityRegistry, never>;
                             ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:6648:26 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵInjectableDeclaration'.

6648     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<TestabilityRegistry>;
                              ~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:9546:25 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵFactoryDeclaration'.

9546     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<ɵConsole, never>;
                             ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/node_modules/@angular/core/core.d.ts:9547:26 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵInjectableDeclaration'.

9547     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<ɵConsole>;
                              ~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/src/angular-datatables.directive.d.ts:39:21 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

39     static ɵfac: i0.ɵɵFactoryDeclaration<DataTableDirective, never>;
                       ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/src/angular-datatables.directive.d.ts:40:21 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/core"' has no exported member 'ɵɵDirectiveDeclaration'.

40     static ɵdir: i0.ɵɵDirectiveDeclaration<DataTableDirective, "[datatable]", never, { "dtOptions": "dtOptions"; "dtTrigger": "dtTrigger"; }, {}, never, never, false>;
                       ~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/src/angular-datatables.module.d.ts:13:21 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

13     static ɵfac: i0.ɵɵFactoryDeclaration<DataTablesModule, never>;
                       ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/src/angular-datatables.module.d.ts:14:21 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.

14     static ɵmod: i0.ɵɵNgModuleDeclaration<DataTablesModule, [typeof i1.DataTableDirective], [typeof i2.CommonModule], [typeof i1.DataTableDirective]>;
                       ~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/angular-datatables/src/angular-datatables.module.d.ts:15:21 - error TS2694: Namespace '"C:/Users/w_jun/Documents/Project ERP/erpsys/node_modules/angular-datatables/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.

15     static ɵinj: i0.ɵɵInjectorDeclaration<DataTablesModule>;

mycomponent.ts

constructor(private http: HttpClient) {}

  allUsers: any = [];
  users() {
    this.http.get('https://jsonplaceholder.typicode.com/users').subscribe((response: any) => {
      this.allUsers = response.data;
    });
  }

mypage.html

<div class="container">
  <div class="card m-5 p-3">
      <div class="card-body">
          <table class="table table-bordered table-striped table-hover">
              <thead>
              <tr>
                  <th>ID</th>
                  <th>Name</th>
                  <th>Username</th>
                  <th>Email</th>
                  <th>Phone number</th>
                  <th>Address</th>
              </tr>
              </thead>
              <tbody>
              <tr *ngFor="let user of allUsers">
                  <td>{{ user.id }}</td>
                  <td>{{ user.name }}</td>
                  <td>{{ user.username }}</td>
                  <td>{{ user.email }}</td>
                  <td>{{ user.phone }}</td>
                  <td>{{ user.address.street }}, {{ user.address.city }}</td>
              </tr>
              </tbody>
          </table>
      </div>

  </div>
</div>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions