Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

angular-datatables has no exported member #1691

Closed
wjun20314 opened this issue Dec 1, 2022 · 5 comments
Closed

angular-datatables has no exported member #1691

wjun20314 opened this issue Dec 1, 2022 · 5 comments

Comments

@wjun20314
Copy link

  • 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>
@shanmukhateja
Copy link
Collaborator

Hi,

Can you provide a small, reproducible repo to investigate this?

@shanmukhateja
Copy link
Collaborator

I was able to reproduce the issue with #1692 The issue happens with fresh install of angular-datatables@14.0.0 however it doesn't happen if I used a local build of the library (using install-local).

I tried using Node v14 and v16 and the problem still occurs.

@l-lin maybe CI build differs somehow? Any ideas how to investigate this?

@l-lin
Copy link
Owner

l-lin commented Dec 10, 2022

The only difference is that the Github action is using a node version 12 as you see here.

Let's see if switching to version 16 changes anything. I'll release a 14.0.1 to test it out.

l-lin added a commit that referenced this issue Dec 10, 2022
@l-lin
Copy link
Owner

l-lin commented Dec 10, 2022

Unfortunately, it does not seem to mitigate the issue, although when I start a new angular project with newest angular/cli (v15), I do not reproduce the issue. Interesting behavior...

Another thing I notice in the sample provided in #1692 is the fact angular-datatables has a dependency to codelyzer which depends on angular 9:

➜ npm list --depth=10 | grep -A 5 angular-datatables
dt-poc@0.0.0 /home/l-lin/tmp/foobar/angular-datatables-bugged
├── __ngcc_entry_points__.json@ extraneous
├─┬ @angular-devkit/build-angular@14.2.10
│ ├─┬ @ampproject/remapping@2.2.0
│ │ ├─┬ @jridgewell/gen-mapping@0.1.1
│ │ │ ├── @jridgewell/set-array@1.1.2
--
├─┬ angular-datatables@14.0.1
│ └─┬ codelyzer@6.0.2
│   ├─┬ @angular/compiler@9.0.0
│   │ └── tslib@1.14.1 deduped
│   ├─┬ @angular/core@9.0.0
│   │ ├── rxjs@6.6.7 deduped

It seems the dependency has been added by this commit. @shanmukhateja, do we need this dependecy? I feel like this issue is linked to this version conflict (same issue as this stackoverflow question.

@l-lin
Copy link
Owner

l-lin commented Dec 13, 2022

v14.0.2 has been released and should fix this issue.

@l-lin l-lin closed this as completed Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants